Fixed unnecessary cloning of Centroids.