added a check to set the unit state back to no state for units that are done targeting a specific unit