fix for non square puzzles