Fixed crash that appears when an enemy is not defeated