Fixed middle ware order.