Fix accessing members in template.