fixed logical error in getCellNeighbors