fixed bug in maze generation