resolved bug with kmeans