Fix that getTemplateVars would return an array of objects instead of the assigned variables values #994