fix bug in knn naive