diff --git a/src/BarrelTrackerWithFrame_geo.cpp b/src/BarrelTrackerWithFrame_geo.cpp
index 85eedde715a5879b90300ea7685aa7a5d8037e2f..99b860ed876349091ec39f1d908af66cc9ab05cd 100644
--- a/src/BarrelTrackerWithFrame_geo.cpp
+++ b/src/BarrelTrackerWithFrame_geo.cpp
@@ -42,16 +42,15 @@ static Ref_t create_BarrelTrackerWithFrame(Detector& description, xml_h e, Sensi
   int                          det_id   = x_det.id();
   string                       det_name = x_det.nameStr();
   DetElement                   sdet(det_name, det_id);
-  //Assembly                     assembly(det_name);
-  map<string, Volume>          volumes;
-  map<string, Placements>      sensitives;
-  map<string, std::vector<VolPlane>>        volplane_surfaces;
-  //map<string, xml_h>      xmleles;
-  PlacedVolume                 pv;
-  dd4hep::xml::Dimension dimensions(x_det.dimensions());
 
+  map<string, Volume>                volumes;
+  map<string, Placements>            sensitives;
+  map<string, std::vector<VolPlane>> volplane_surfaces;
   map<string, std::array<double, 2>> module_thicknesses;
 
+  PlacedVolume           pv;
+  dd4hep::xml::Dimension dimensions(x_det.dimensions());
+
   Acts::ActsExtension* detWorldExt = new Acts::ActsExtension();
   detWorldExt->addType("barrel", "detector");
   sdet.addExtension<Acts::ActsExtension>(detWorldExt);
diff --git a/src/TrapEndcapTracker_geo.cpp b/src/TrapEndcapTracker_geo.cpp
index 2a2efb335abe4f961c63de8990bd1c80a4986a72..b20e6d161b7209bfe8313e949bfde636e2740be5 100644
--- a/src/TrapEndcapTracker_geo.cpp
+++ b/src/TrapEndcapTracker_geo.cpp
@@ -38,7 +38,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
   bool                         reflect  = x_det.reflect(false);
   DetElement                   sdet(det_name, det_id);
   Assembly                     assembly(det_name);
-  map<string, std::array<double, 2>> module_thicknesses;
 
   Material  air  = description.material("Air");
   // Volume      assembly    (det_name,Box(10000,10000,10000),vacuum);
@@ -46,6 +45,8 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
   int                     m_id = 0, c_id = 0, n_sensor = 0;
   map<string, Volume>     modules;
   map<string, Placements> sensitives;
+  map<string, std::vector<VolPlane>>        volplane_surfaces;
+  map<string, std::array<double, 2>> module_thicknesses;
   PlacedVolume            pv;