[#2007] Patched the hostname determination