Fixed $values in index when a template is present