diff --git a/src/mesh/MeshFlatNodeBoundary.cpp b/src/mesh/MeshFlatNodeBoundary.cpp
index 059d6b004e1f3eaff9c9940dec3f2af7b8fbf57c..d8cea01af7c3c88a73af75cbf51c5a43f3e5ebd1 100644
--- a/src/mesh/MeshFlatNodeBoundary.cpp
+++ b/src/mesh/MeshFlatNodeBoundary.cpp
@@ -17,7 +17,7 @@ MeshFlatNodeBoundary<Dimension>::_checkBoundaryIsFlat(const TinyVector<Dimension
 
   parallel_for(this->m_node_list.size(), [=, &is_bad](int r) {
     const Rd& x = xr[this->m_node_list[r]];
-    if (dot(x - origin, normal) > 1E-13 * length) {
+    if (std::abs(dot(x - origin, normal)) > 1E-13 * length) {
       is_bad = true;
     }
   });