diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C
index 4a88c3d..f234e5f 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C
+++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C
@@ -303,6 +303,7 @@ void Foam::isoSurfaceCell::generateTriPoints
 ) const
 {
     tetMatcher tet;
+    label countNotFoundTets = 0;
 
     forAll(mesh_.cells(), cellI)
     {
@@ -395,16 +396,25 @@ void Foam::isoSurfaceCell::generateTriPoints
             }
             else
             {
-                const cell& cFaces = mesh_.cells()[cellI];
+                //Repeated line
+                //const cell& cFaces = mesh_.cells()[cellI];
 
                 forAll(cFaces, cFaceI)
                 {
                     label faceI = cFaces[cFaceI];
                     const face& f = mesh_.faces()[faceI];
 
-                    const label fp0 = mesh_.tetBasePtIs()[faceI];
+                    label fp0 = mesh_.tetBasePtIs()[faceI];
+
+                    //skip undefined tetrahedral cells
+                    if(fp0 < 0)
+                    {
+                        fp0 = 0;
+                        countNotFoundTets++;
+                    }
 
                     label fp = f.fcIndex(fp0);
+
                     for (label i = 2; i < f.size(); i++)
                     {
                         label nextFp = f.fcIndex(fp);
@@ -485,6 +495,15 @@ void Foam::isoSurfaceCell::generateTriPoints
             }
         }
     }
+    
+    if(countNotFoundTets>0)
+    {
+        WarningIn("Foam::isoSurfaceCell::generateTriPoints(...) const")
+            << "Did not find " << countNotFoundTets
+            << " tet base point indices, which has likelly lead to inverted"
+            << " triangles. "
+            << endl;
+    }
 
     triPoints.shrink();
     triMeshCells.shrink();
