Added middlewares.