Fix crash when starting a battle