fixed bug that curNode in search is considered a neighbour