Fix bug in DNS check (fixes issue #22)