Fix unknown hostname always being returned by foreign host