diff --git a/Trajectories/Tests/perf_tests.json b/Trajectories/Tests/perf_tests.json
index 88162b77a25d814aaf0d03853f7b174290f2471c..5e1e35208bf7d5470f57522110ab0dac877b1f02 100644
--- a/Trajectories/Tests/perf_tests.json
+++ b/Trajectories/Tests/perf_tests.json
@@ -11,7 +11,7 @@
     "Perf_cost_function": {
 	"description": "Performance test with adjustable size of input.",
 	"command": [
-            "$src_dir/Trajectories/cost_function.py",
+            "$src_dir/Trajectories/cost_function.py", "--avg_fix",
             "$my_data_dir/Global_1993_2023/SHPC",
             "Anticyclones",
             "$PWD/Perf_segments/segments.gt",
diff --git a/Trajectories/Tests/tests.json b/Trajectories/Tests/tests.json
index 274806e99c45ebd7863f41be690fbb3f38c35256..f69e57f573e64eef3abbe7f0f91fa992512b01f6 100644
--- a/Trajectories/Tests/tests.json
+++ b/Trajectories/Tests/tests.json
@@ -40,7 +40,7 @@
     },
     "Cost_functions": {
 	"command": [
-            "$src_dir/Trajectories/cost_function.py",
+            "$src_dir/Trajectories/cost_function.py", "--avg_fix",
             "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC",
             "Anticyclones",
             "$tests_old_dir/Segments/segments.graphml",
@@ -60,7 +60,7 @@
     "Greece_cost_function": {
 	"description": "This is a case where the speed is not defined on a whole segment. It can be seen in the properties first_av_ros or last_av_ros.",
 	"command": [
-            "$src_dir/Trajectories/cost_function.py",
+            "$src_dir/Trajectories/cost_function.py", "--avg_fix",
             "$tests_old_dir/Greece/SHPC",
             "Anticyclones",
             "$tests_old_dir/Greece_segments/segments.graphml",
@@ -73,7 +73,7 @@
 	"description": "Like Greece_cost_function but without option --debug.",
 	"command":
 	[
-            "$src_dir/Trajectories/cost_function.py",
+            "$src_dir/Trajectories/cost_function.py", "--avg_fix",
 	    "$tests_old_dir/Greece/SHPC", "Anticyclones",
             "$tests_old_dir/Greece_segments/segments.graphml",
             "segments_cost_functions.graphml"
@@ -110,7 +110,7 @@
 	"I want a larger case than Greece to test script cost_function.py.",
 	"command":
 	[
-	    "$src_dir/Trajectories/cost_function.py",
+	    "$src_dir/Trajectories/cost_function.py",  "--avg_fix",
 	    "$my_data_dir/Eurec4A/SHPC", "Anticyclones",
 	    "$tests_old_dir/Eurec4A_segments/segments.graphml",
 	    "segments_cost.graphml"