fixed hostname retrieval