unit.wait + some cleanup