Fixed getting wrong protocol from get_hostname.