Nearest neighbor fix