fix bug where duplicate templates were being created if you edited the template
Merge remote-tracking branch 'origin/master'