Modified web.js to fix heroku app crash