Fixes to kmeans solutions