KNearest fixes