Fix handling of raw user agent