Fixes to template