Fixed adding default type when adding a new template.