improve cleaning up in dht tests.