battle end bug fixed