Minor fixes in app.py and main.py