diff --git a/src/control.F90 b/src/control.F90
index 6ee07ac677f8df475292ed8db09a6fb13605616d..a3f0009d8963c28960583b4843bd93e91591cef2 100644
--- a/src/control.F90
+++ b/src/control.F90
@@ -15,13 +15,13 @@ SUBROUTINE control
 
 
   call daytim('Start at ')
-  
+
   !                   1.2     Define data specific to run
   WRITE(*,*) 'Load basic data...'
   CALL basic_data
   WRITE(*,*) '...basic data loaded.'
 
-  
+
   !                   1.3   Read input parameters from input file
   WRITE(*,*) 'Read input parameters...'
   CALL readinputs
@@ -43,7 +43,7 @@ SUBROUTINE control
   WRITE(*,*) '...initial diagnostics done'
   !
   CALL FLUSH(stdout)
-  
+
   !________________________________________________________________________________
   !              2.   Main loop
   DO
@@ -53,9 +53,10 @@ SUBROUTINE control
      time  = time  + dt
 
      CALL tesend
-     CALL diagnose(step)
      IF( nlend ) EXIT ! exit do loop
 
+     CALL diagnose(step)
+
      ! CALL write_restart ! if want to write a restart file every so often (in case of crash)
   END DO
   !________________________________________________________________________________
diff --git a/src/tesend.F90 b/src/tesend.F90
index 132ed8d298d64c4508f7c13177ec877cff59f05f..121637b681bce53896cbcfff474333b0102a3c17 100644
--- a/src/tesend.F90
+++ b/src/tesend.F90
@@ -16,7 +16,7 @@ SUBROUTINE tesend
 
   !________________________________________________________________________________
   !                   2.  Test on NRUN
-  nlend = step .GE. nrun 
+  nlend = step .GT. nrun 
   IF ( nlend ) THEN 
      WRITE(*,'(/a)') 'NRUN steps done'
      RETURN
@@ -25,7 +25,7 @@ SUBROUTINE tesend
 
   !________________________________________________________________________________
   !                   3.  Test on TMAX
-  nlend = time .GE. tmax
+  nlend = time .GT. tmax
   IF ( nlend ) THEN 
      WRITE(*,'(/a)') 'TMAX reached'
      RETURN