Fixing get_host bug