fix map generation bug