fixed bugs in map generation