bugfix: lazy load user agents in middleware