Correctly fixes a nil hostname