fixing kmeans