Fixed TemplateWizardSave bugs