Added middleware.