Fixed adding templates
Merge pull request #255 from dswd/fix-add-template

Fixed adding templates