fixed small bug in kmeans