fixed error in kmeans