Fix a bug in web.js