more fixes to template