fixed bug in app.py and zmodel.py