Add missing closing tags in base templates