Fix a bug that stops battle