Fix N-queens bug, be careful to cut off when using backtracking