handle some issue related to map ID

But still have some bugs