made fix to app.py to thwart Heroku internal server error