Apply similar fix to additional_middlewares