fixes unclosed template instructions and unescaped single quotes

fix 2 errors 500