Fix bug when change the map