Fix attempt for invalid/missing user agent string