Added some middlewares