diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index 36ac6db473ab646f97dbb0152b8041ece522566a..0f1cc6d3a27b07a70b9b7b8e2b4f3ad1703cdfbe 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -161,7 +161,7 @@ static double _computeDeterminantAndRegularize(MElement *ele, double jac[3][3])
     } 
   case 1: 
     {
-      dJ = sqrt(SQU(jac[0][0]) + SQU(jac[1][0]) + SQU(jac[2][0]));
+      dJ = sqrt(SQU(jac[0][0]) + SQU(jac[0][1]) + SQU(jac[0][2]));
 
       // regularize matrix
       double a[3], b[3], c[3];
diff --git a/Graphics/drawGeom.cpp b/Graphics/drawGeom.cpp
index cfe11bf5a27d79db6f9173127528a96caf2ccbb3..07957bd1c398c9b0b153fe650f5003695fc132c0 100644
--- a/Graphics/drawGeom.cpp
+++ b/Graphics/drawGeom.cpp
@@ -381,6 +381,7 @@ class drawGFace {
   {
     if(!f->getVisibility()) return;
      if(f->geomType() == GEntity::DiscreteSurface) return;
+     if(f->geomType() == GEntity::PartitionSurface) return;
     if(f->geomType() == GEntity::BoundaryLayerSurface) return;
 
     bool select = (_ctx->render_mode == drawContext::GMSH_SELECT && 
diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp
index 8856b1e5a791924119bb69349e045ee675cb2747..342e929221b70e765c79adc2a700775ce6bce147 100644
--- a/Mesh/meshPartition.cpp
+++ b/Mesh/meshPartition.cpp
@@ -826,20 +826,15 @@ int CreatePartitionBoundaries(GModel *model)
   std::set<partitionFace*, Less_partitionFace> pfaces;
 
   // assign partition faces
-  {
-    std::multimap<MFace,MElement*,Less_Face> faceToElement;
-    if (meshDim == 3){
-      for(GModel::riter it = model->firstRegion(); it != model->lastRegion(); ++it){
-	fillit_ ( faceToElement,(*it)->tetrahedra.begin(),(*it)->tetrahedra.end());
-	fillit_ ( faceToElement,(*it)->hexahedra.begin(),(*it)->hexahedra.end());
-	fillit_ ( faceToElement,(*it)->prisms.begin(),(*it)->prisms.end());
-	fillit_ ( faceToElement,(*it)->pyramids.begin(),(*it)->pyramids.end());
-	fillit_ ( faceToElement,(*it)->polyhedra.begin(),(*it)->polyhedra.end());
-      }    
-    }
-    
-    //  printf("%d edges to elements\n",edgeToElement.size());
-    
+  if (meshDim == 3){
+    std::multimap<MFace,MElement*,Less_Face> faceToElement;    
+    for(GModel::riter it = model->firstRegion(); it != model->lastRegion(); ++it){
+      fillit_ ( faceToElement,(*it)->tetrahedra.begin(),(*it)->tetrahedra.end());
+      fillit_ ( faceToElement,(*it)->hexahedra.begin(),(*it)->hexahedra.end());
+      fillit_ ( faceToElement,(*it)->prisms.begin(),(*it)->prisms.end());
+      fillit_ ( faceToElement,(*it)->pyramids.begin(),(*it)->pyramids.end());
+      fillit_ ( faceToElement,(*it)->polyhedra.begin(),(*it)->polyhedra.end());
+    }    
     {
       std::multimap<MFace,MElement*,Less_Face>::iterator it = faceToElement.begin();
       Equal_Face oper;
@@ -857,7 +852,7 @@ int CreatePartitionBoundaries(GModel *model)
   }
   
   // assign partition edges
-  {
+  if (meshDim > 1){
     std::multimap<MEdge,MElement*,Less_Edge> edgeToElement;
     if (meshDim == 2){
       for(GModel::fiter it = model->firstFace(); it != model->lastFace(); ++it){
@@ -875,9 +870,6 @@ int CreatePartitionBoundaries(GModel *model)
 	fillit_ ( edgeToElement,(*it)->polyhedra.begin(),(*it)->polyhedra.end());
       }    
     }
-    
-    //  printf("%d edges to elements\n",edgeToElement.size());
-    
     {
       std::multimap<MEdge,MElement*,Less_Edge>::iterator it = edgeToElement.begin();
       Equal_Edge oper;
@@ -895,7 +887,7 @@ int CreatePartitionBoundaries(GModel *model)
   }
 
   // make partition vertices
-  {
+  if (meshDim > 1){
     std::multimap<MVertex*,MElement*> vertexToElement;
     if (meshDim == 2){
       for(GModel::fiter it = model->firstFace(); it != model->lastFace(); ++it){
diff --git a/benchmarks/boolean/TORUS.geo b/benchmarks/boolean/TORUS.geo
index 16be03c4a4fb6b4fa029e37195dc3a6e74a9cda9..b890f1965e2b0cb6bcdadf1f92b28f59ae4c23f5 100644
--- a/benchmarks/boolean/TORUS.geo
+++ b/benchmarks/boolean/TORUS.geo
@@ -1,3 +1,2 @@
-
 OCCShape("Torus",{0,0,0,0,0,1,10,9},"None");
-//BoundingBox{0,0,0,10,10,10};
+BoundingBox{0,0,0,10,10,10};