Fixed problems with maze generator.