Fix error when the map crashses