 
     /* check if cell opening condition is satisfied */
     const float4 cellCOM1 = make_float4(cellCOM.x, cellCOM.y, cellCOM.z, cellPos.w);
-    const bool splitCell = split_node_grav_impbh(cellCOM1, groupPos, groupSize);
+    bool splitCell = split_node_grav_impbh(cellCOM1, groupPos, groupSize);
 #else /*added by egaburov, see compute_propertiesD.cu for matching code */
-    const bool splitCell = split_node_grav_impbh(cellPos, groupPos, groupSize);
+    bool splitCell = split_node_grav_impbh(cellPos, groupPos, groupSize);
 #endif
 
     /* compute first child, either a cell if node or a particle if leaf */
     const int cellData = __float_as_int(cellSize.w);
     const int firstChild =  cellData & 0x0FFFFFFF;
     const int nChildren  = (cellData & 0xF0000000) >> 28;
+    
+    if(cellData == 0xFFFFFFFF)
+      splitCell = false;
 
     /**********************************************/
     /* split cells that satisfy opening condition */

    const float mass, const float3 com,
    const float4 Q0,  const float4 Q1, float eps2) 
{
  const float3 dr = make_float3(pos.x - com.x, pos.y - com.y, pos.z - com.z);
  const float  r2 = dr.x*dr.x + dr.y*dr.y + dr.z*dr.z + eps2;


// total: 16 + 3 + 22 + 23 = 64 flops 

  return acc;
#endif
}

template<int NI, bool FULL>
