fixed generation of unsolvable puzzles.