Modified web.js to fix heroku crash