Fix Middleware