fixing user agent check