diff --git a/Overlap/Tests/test_read_eddy.f90 b/Overlap/Tests/test_read_eddy.f90
index 7e6bd7fa8cce29adf36e21424e6ba645117f3479..071aa8f746fc77ef237894ad3ff61ea782edb153 100644
--- a/Overlap/Tests/test_read_eddy.f90
+++ b/Overlap/Tests/test_read_eddy.f90
@@ -26,9 +26,8 @@ program test_read_eddy
   read(unit = *, nml = main_nml)
   call shpc_open(hshp_in, shpc_dir, pszaccess = "rb")
   call read_eddy(e, k, eddy_i, hshp_in, ishape)
-  CALL shpc_close(hshp_in)
-
   call shpc_create(hshp_out, shpc_dir = "SHPC", cyclone = hshp_in%cyclone)
+  CALL shpc_close(hshp_in)
   call write_eddy(e, hshp_out, k, eddy_i)
   CALL shpc_close(hshp_out)
   print *, 'Created shapefiles in SHPC.'