bug fix for new centroids update