Fixed bugs re. wsgi