apply context on last middlewares