fixed battles.js