fixed a bug in web.js