Update middleware.