Added missing middleware