fix a bug in ERBBattle