Fixes bug in app.py