fix bugs
map tested