Bug fixes to get the DNS client working