updated web.js with buffer fixed