fix issues in template