better cleanup in unit test