Bugfix for Kmeans. Now works on single machine