fix battle controll code