Minor fixes to templates.