bug fix to new template creation