Added better checking around DNS results.