Fixed crash when opening the map