fixed user agent check