Small fixes to template files