diff --git a/src/conex_sub.F b/src/conex_sub.F
index b885fa37545806a279d120854eca46e2ed364328..ab3e025bb050f7b367fde5390e297f0a209283e1 100644
--- a/src/conex_sub.F
+++ b/src/conex_sub.F
@@ -22925,7 +22925,6 @@ c-----------------------------------------------------------------------
 
 #if !__CORSIKA8__
 
-
 C=======================================================================
 
       DOUBLE PRECISION FUNCTION DRANGEN(dummy)
@@ -22983,6 +22982,8 @@ c      dum=dummy    !floating point exception for some compilers ???
       END
 
 
+#if !__CORSIKA8__
+
 c-----------------------------------------------------------------------
       subroutine ranfgt(seed)
 c-----------------------------------------------------------------------
@@ -23280,6 +23281,9 @@ C  COMPLETE INITIALIZATION BY SKIPPING (NTOT2*MODCNS+NTOT) RANDOMNUMBERS
       RETURN
       END
 
+#endif 
+
+
 *-- Author :    The CORSIKA development group   21/04/1994
 C=======================================================================
 
@@ -23369,7 +23373,6 @@ C-----------------------------------------------------------------------
 
       end
 
-
 #endif
 
 C-----------------------------------------------------------------------