Added better DNS handling