diff --git a/src/conex_sub.F b/src/conex_sub.F
index 32cb13b8338de844fa2acd0fdcae18a7473eb021..b885fa37545806a279d120854eca46e2ed364328 100644
--- a/src/conex_sub.F
+++ b/src/conex_sub.F
@@ -3130,19 +3130,19 @@ c-----------------------------------------------------------------------
 
       nptlc=0
       mc2ce=.false.
-#if __CXCORSIKA__
+#if __CXCORSIKA__ || __CORSIKA8__
       if(isx.ge.2)then
 #endif
         if(n.gt.0.and.mod(n,i).eq.0)then
           write(6,'(a,$)')'electron-photon shower'
           write(6,*)n,'  --  Energy:',dptl(4),'    Depth:',dptl(13)
-#ifndef __CXCORSIKA__
+#if !__CXCORSIKA__ && !__CORSIKA8__
           call ranfgt(seed)
           write(6,*)' seq ',lseq,'  --  iseed(1) ',iiseed(1,lseq)
      &     ,' iseed(2) ',iiseed(2,lseq),' iseed(3) ',iiseed(3,lseq)
 #endif
         endif
-#if __CXCORSIKA__
+#if __CXCORSIKA__ || __CORSIKA8__
       endif
 #endif
 
@@ -22921,7 +22921,9 @@ c-----------------------------------------------------------------------
       end
 
 
-#ifndef __CXCORSIKA__
+#if !__CXCORSIKA__ 
+
+#if !__CORSIKA8__
 
 
 C=======================================================================
@@ -22951,6 +22953,8 @@ c      dum=dummy    !floating point exception for some compilers ???
       RETURN
       END
 
+#endif
+
 C=======================================================================
 
       DOUBLE PRECISION FUNCTION DRANEGS(dummy)