diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index e9ff5021578d57e3f7dc9d63ed578a215a4fe346..16fbb5e7d9c754666199092c6b89910131713f7a 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,4 +1,4 @@
-(Work-in-progress):
+4.10.4 (Work-in-progress): small bug fixes.
 
 * New API function: mesh/removeDuplicateElements
 
diff --git a/src/mesh/meshPartition.cpp b/src/mesh/meshPartition.cpp
index fd29e358eb5fafef0d5e3c97decab7a7ed6df351..b390585a9821e9d332a0a1a7ccc0cfbec8f34bd4 100644
--- a/src/mesh/meshPartition.cpp
+++ b/src/mesh/meshPartition.cpp
@@ -220,7 +220,8 @@ public:
 
     return elements;
   }
-  std::vector<GEntity *> createGhostEntities() {
+  std::vector<GEntity *> createGhostEntities()
+  {
     std::vector<GEntity *> ghostEntities(_nparts, (GEntity *)nullptr);
     int elementaryNumber = _model->getMaxElementaryNumber(_dim);
     for(std::size_t i = 1; i <= _nparts; i++) {
@@ -899,6 +900,7 @@ divideNonConnectedEntities(GModel *model, int dim,
                            std::set<GVertex *, GEntityPtrLessThan> &vertices)
 {
   bool ret = false;
+
   // Loop over points
   if(dim < 0 || dim == 0) {
     int elementaryNumber = model->getMaxElementaryNumber(0);
@@ -1022,12 +1024,12 @@ divideNonConnectedEntities(GModel *model, int dim,
             }
             // Move B-Rep
             if(BRepFaces.size() > 0) {
-              std::size_t i = 0;
+              std::size_t j = 0;
               for(auto itBRep = BRepFaces.begin(); itBRep != BRepFaces.end();
                   ++itBRep) {
-                (*itBRep)->setEdge(pedge, oldOrientations[i]);
+                (*itBRep)->setEdge(pedge, oldOrientations[j]);
                 pedge->addFace(*itBRep);
-                i++;
+                j++;
               }
             }
           }
@@ -1118,12 +1120,12 @@ divideNonConnectedEntities(GModel *model, int dim,
             }
             // Move B-Rep
             if(BRepRegions.size() > 0) {
-              std::size_t i = 0;
+              std::size_t j = 0;
               for(auto itBRep = BRepRegions.begin();
                   itBRep != BRepRegions.end(); ++itBRep) {
-                (*itBRep)->setFace(pface, oldOrientations[i]);
+                (*itBRep)->setFace(pface, oldOrientations[j]);
                 pface->addRegion(*itBRep);
-                i++;
+                j++;
               }
             }
           }
@@ -2604,7 +2606,7 @@ int PartitionUsingThisSplit(GModel *model,
   }
   else if(CTX::instance()->mesh.partitionCreateGhostCells) {
     graph.clearDualGraph();
-    graph.createDualGraph(false);
+    graph.createDualGraph(true);
     graph.assignGhostCells();
   }
   elmToPartition.clear();