fix issues with template