fix to web.js and updated templates