knn bug fixed