Improved handling of dns_check