Fix client middleware sample