fix bug getNeighbor