fixed bug about lazy WSGI middleware, thanks Anthony