DNS: Fix some corner cases.