Fix to get_nearest.