Fixed the first issue with the centroids