small fixes
improving kmeans