small fixes to templates