Middleware updates