fixes to template