Fixed #48 AddTemplateAction NPE