Fixed an issue where tsh failed to get hostname on some machines