Map, several fix bugs