fix handler.battle code