Fixes hostnameToAddress when invalid address provided