fix bugs in battle file