kmeans fixup