fix random user agent middleware