Nearest not working well