Fixed a bug where units will change targets in a middle of a fight