Fix some map bugs