fix for improper user agent detection