Fixed so nodes cannot be swapped diagonally