fix unit state setting on cancelation