miss tweaking in NearestNeighbor to keep the real closest one