add missing middleware