fixed some map generating bugs