fixing some map bugs