modified to fix hostname eoors in OSX