fix errors in template