Workaround for crash running on mod_wsgi