Fix crash in battles