Modified getDNS method in network class to make sure array values are
not overwritten.