updated web.js and index.html to fix bugs