Add missing closing tags to templates.