fix for crash when no host is present