fix shell cleanup