Modification of web.js that should most probably work