diff --git a/F90subroutines/routing_reg.f90 b/F90subroutines/routing_reg.f90
index 2ed9fc4dadcddb61520b3636348ea39484196019..d005d2104527b7bf6e7ee6e5193a82a6017a6f0c 100644
--- a/F90subroutines/routing_reg.f90
+++ b/F90subroutines/routing_reg.f90
@@ -2712,7 +2712,7 @@ SUBROUTINE routing_reg_end_truncate(nbpt, nbasmax, gridarea, contfrac, nwbas, nu
              route_tobasin_glo(ib,ij) = nbasmax + 2
              route_togrid_glo(ib,ij) = ib
           ! River flows
-          IF ( route_togrid_glo(ib,ij) .EQ. -1 ) THEN
+          ELSE IF ( route_togrid_glo(ib,ij) .EQ. -1 ) THEN
              route_tobasin_glo(ib,ij) = nbasmax + 2
              route_togrid_glo(ib,ij) = ib
           ! Coastal flows