Fix issue when user agent header not found