Centroid bug fixed