Fix for user agent parsing