Move user agent assignment higher