Fixed 2 bugs with fetchTemplates