kmeans and classifier error fix