Fix to work even when host name is shorter than IP number and on OS X in general...