Fix typo in middleware.py