Corrected computeTrianglesPerCell