added a catch for a crash in battles