Zero fix app.py

Zero and one exceptions handled.