Fixed getNeighbors