Better clean up in tests