Fix passing of useragent and referer