Fix battle crash