bug fix of battle api