add a test, make cleanup more robust