fix K nearest neighbours.