Fixed bug in MazeGenerator