Reapplied changes for DNS resolution after rebase (for issue #7).