small bugfix in TemplateDao