fixed bug in app.js file that was causing forever to crash on server