Corrected app.py which breaks down from previous commit