Fix a syntax error in template.js