Fix error with other django middleware.