use ip if hostname fails