kmeans fix