Fixed condition when deleting a Unit