diff --git a/Src/Core/FFmmAlgorithmThreadProc.hpp b/Src/Core/FFmmAlgorithmThreadProc.hpp
index 345ecc9ce1ecddfc3dc1d2c2f34b932a9825832c..3202dca07d00b82985c5893ecec9b440a172b16e 100644
--- a/Src/Core/FFmmAlgorithmThreadProc.hpp
+++ b/Src/Core/FFmmAlgorithmThreadProc.hpp
@@ -804,22 +804,25 @@ public:
         FDEBUG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); );
         FDEBUG(FTic counterTime);
 
-        const int LeafIndex = OctreeHeight - 1;
-        int leafs = 0;
         {
             OctreeIterator octreeIterator(tree);
             octreeIterator.gotoBottomLeft();
-            // for each cells
-            do{
-                iterArray[leafs] = octreeIterator;
-                ++leafs;
-            } while(octreeIterator.moveRight());
+
+            for(int idxLeaf = 0 ; idxLeaf < this->leafLeft ; ++idxLeaf){
+                octreeIterator.moveRight();
+            }
+
+            for(int idxLeaf = this->leafLeft ; idxLeaf <= this->leafRight ; ++idxLeaf){
+                iterArray[idxLeaf] = octreeIterator;
+                octreeIterator.moveRight();
+            }
         }
 
         FDEBUG(FTic computationCounter);
 
-        const int startIdx = getLeft(leafs);
-        const int endIdx = getRight(leafs);
+        const int LeafIndex = OctreeHeight - 1;
+        const int startIdx = this->leafLeft;
+        const int endIdx = this->leafRight + 1;
 
         #pragma omp parallel
         {