Fixed template save issue.