fix a bug in combat causing crashes