Use better API to get the host