Fix bug that caused the map data to not reset properly