diff --git a/Inst_eddies/Tests/test_set_max_speed.f90 b/Inst_eddies/Tests/test_set_max_speed.f90
index f6b04a518ed53e3828ddcb91220c5b748c84302c..82fafd16e6531f5341dac7d18f66c58a89674285 100644
--- a/Inst_eddies/Tests/test_set_max_speed.f90
+++ b/Inst_eddies/Tests/test_set_max_speed.f90
@@ -138,9 +138,9 @@ program test_set_max_speed
      call shpclose(hshp)
      call create_cont_list
      call set_max_speed(e%speed_cont, e%max_speed, cont_list, cont_list_proj, &
-          n_cont, e%extr%coord, ssh(llc(1):urc(1), llc(2):urc(2)), &
-          u(llc(1):urc(1), llc(2):urc(2)), v(llc(1):urc(1), llc(2):urc(2)), &
-          corner_window, step)
+          n_cont, e%extr%coord, real(e%extr%coord_proj), &
+          ssh(llc(1):urc(1), llc(2):urc(2)), u(llc(1):urc(1), llc(2):urc(2)), &
+          v(llc(1):urc(1), llc(2):urc(2)), corner_window, step)
      call close_cont_list
      call shpc_create(hshpc, shpc_dir = "SHPC", cyclone = cyclone, slice = 0, &
           grid_lon_lat = .true.)
diff --git a/Inst_eddies/set_contours.f90 b/Inst_eddies/set_contours.f90
index f5e1a2abaee8d4264b4c8f8e29476932a376c183..41c2d62e936c2b176c7c8259a28eb33f20636380 100644
--- a/Inst_eddies/set_contours.f90
+++ b/Inst_eddies/set_contours.f90
@@ -118,7 +118,8 @@ contains
        ! Done restricting field
 
        call set_max_speed(speed_cont, max_speed, cont_list, cont_list_proj, &
-            n_cont, extr%coord, ssh(llc(1):urc(1), llc(2):urc(2)), &
+            n_cont, extr%coord, real(extr%coord_proj), &
+            ssh(llc(1):urc(1), llc(2):urc(2)), &
             u(llc(1):urc(1), llc(2):urc(2)), &
             v(llc(1):urc(1), llc(2):urc(2)), corner_window, step)
     end if
diff --git a/Inst_eddies/set_max_speed.f90 b/Inst_eddies/set_max_speed.f90
index 15e97fb03400ccf0b8dc5b0b992f4c62903198af..63dfa573db560bf279b9b52e0b904ad1dd2543a9 100644
--- a/Inst_eddies/set_max_speed.f90
+++ b/Inst_eddies/set_max_speed.f90
@@ -5,7 +5,7 @@ module set_max_speed_m
 contains
 
   subroutine set_max_speed(speed_cont, max_speed, cont_list, cont_list_proj, &
-       n_cont, extr_coord, ssh, u, v, corner, step)
+       n_cont, extr_coord, extr_coord_proj, ssh, u, v, corner, step)
 
     ! This procedure defines speed_cont and max_speed. On return,
     ! speed_cont may be a null ssh contour and max_speed may be set to
@@ -72,6 +72,9 @@ contains
     real, intent(in):: extr_coord(:)
     ! (2) longitude and latitude of extremum , in rad
 
+    real, intent(in):: extr_coord_proj(:) ! (2)
+    ! coordinates of extremum in projection space
+
     real, intent(in):: ssh(:, :), u(:, :), v(:, :)
     ! The domain should be the bounding box of out_cont, because we do
     ! not exclude other extrema.
@@ -86,12 +89,11 @@ contains
     ! Local:
     real, allocatable:: speed(:) ! (n_cont) speed on the contour
     integer i, i_outer, ishape
-    real corner_proj(2), extr_coord_proj(2)
+    real corner_proj(2)
 
     !---------------------------------------------------------------
 
     corner_proj = (corner - corner_whole) / step + 1.
-    extr_coord_proj = (extr_coord - corner_whole) / step + 1.
     i_outer = n_cont
     if (n_cont >= 2) call complete_ssh(cont_list_proj%ssh, n_cont)