Bugfixes on Matrix Puzzle