Add fixes for WSGI deployment