make cleanup safer