WSGI fixes