diff --git a/DDCore/src/Alignments.cpp b/DDCore/src/Alignments.cpp
index 0fb9eec60a423ca89ea72690d38a3c040d67717c..6a05bd0706ca17a75a5bc382791d443a4bdc65b5 100644
--- a/DDCore/src/Alignments.cpp
+++ b/DDCore/src/Alignments.cpp
@@ -40,7 +40,7 @@ namespace DD4hep {
     }
 #else
     /// Initializing constructor to create a new object (Specialized for AlignmentNamedObject)
-    template <> Alignment::Alignment<Alignment::Object>(const string& nam) {
+    template <> Alignment::Alignment<AlignmentData>(const string& nam) {
       assign(new Alignment::Object(), nam, "alignment");
     }
     /// Initializing constructor to create a new object (Specialized for AlignmentNamedObject)
@@ -48,7 +48,7 @@ namespace DD4hep {
       assign(new Interna::AlignmentNamedObject(nam, "alignment"), nam, "alignment");
     }
     /// Initializing constructor to create a new object (Specialized for AlignmentConditionObject)
-    template <> AlignmentCondition::AlignmentCondition<AlignmentCondition::Object>(const string& nam) {
+    template <> AlignmentCondition::AlignmentCondition<Interna::AlignmentConditionObject>(const string& nam) {
       assign(new Object(nam, "alignment"), nam, "alignment");
     }
 #endif
diff --git a/DDSegmentation/src/MegatileLayerGridXY.cpp b/DDSegmentation/src/MegatileLayerGridXY.cpp
index 7892d09279a66112da3a9ec056380577bb5a5d93..cbe1cebb0a2111c0d65b1ce1526915c553c1f4af 100644
--- a/DDSegmentation/src/MegatileLayerGridXY.cpp
+++ b/DDSegmentation/src/MegatileLayerGridXY.cpp
@@ -73,9 +73,10 @@ namespace DD4hep {
       cellPosition.X = cellIndexX * (_currentSegInfo.megaTileSizeX / _currentSegInfo.nCellsX ) + _currentSegInfo.megaTileOffsetX;
       cellPosition.Y = cellIndexY * (_currentSegInfo.megaTileSizeY / _currentSegInfo.nCellsY ) + _currentSegInfo.megaTileOffsetY;
 
-      if ( abs( cellPosition.X )>10000 || abs( cellPosition.Y )>10000 ) {
+      if ( std::fabs( cellPosition.X )>10000e0 || std::fabs( cellPosition.Y )>10000e0 ) {
         std::cout << "crazy cell position: " << cellPosition.X << " " << cellPosition.Y << std::endl;
-        std::cout << "layer, wafer, cellx,y indices: " << layerIndex << " " << waferIndex << " " << cellIndexX << " " << cellIndexY << std::endl;
+        std::cout << "layer, wafer, cellx,y indices: " << layerIndex << " " << waferIndex
+                  << " " << cellIndexX << " " << cellIndexY << std::endl;
         assert(0 && "crazy cell position?");
       }
 
@@ -84,7 +85,10 @@ namespace DD4hep {
 
 
     /// determine the cell ID based on the position
-    CellID MegatileLayerGridXY::cellID(const Vector3D& localPosition, const Vector3D& /* globalPosition */, const VolumeID& vID) const {
+    CellID MegatileLayerGridXY::cellID(const Vector3D& localPosition,
+                                       const Vector3D& /* globalPosition */,
+                                       const VolumeID& vID) const
+    {
       // this is the local position within a megatile, local coordinates
 
       // get the layer, wafer, module indices from the volumeID