Fixing for undefined hostname