fix the bug dealing with map data is before the map pop