diff --git a/DDSim/DD4hepSimulation.py b/DDSim/DD4hepSimulation.py
index 94f3b972687dfd08f8f494c4459f74ae84114537..e5e288241b7e33fe0fa13c963714f4b827ae00ee 100644
--- a/DDSim/DD4hepSimulation.py
+++ b/DDSim/DD4hepSimulation.py
@@ -235,7 +235,7 @@ class DD4hepSimulation(object):
   #    print " subset list of detectors given - will only instantiate these: " , detectorList
     trackers,calos = [],[]
     for i in lcdd.detectors():
-      det = DDG4.DetElement(i.second)
+      det = DDG4.DetElement(i.second.ptr())
       name = det.name()
       sd =  lcdd.sensitiveDetector( name )
       if sd.isValid():