Fix crash when deleting end mission (#313)