fix kmeans