Fix mistaken middleware parametrization