Fix when the hostname is None