fix metric in kmeans