Modified web.js to fix crash