fixed problem allowing unsolvable puzzles to solve