safer cleanup