Fix ordering of Middlewares