bugfix in 2d kmeans