fixed bug in web.js