dht fixes

Fixing dht issues.
scary scary! I also just realized that we never call Close on the network in the normal course of running things...