Clean up and fix dns flush