Fix bug on battle ends