Changed the behavior of the templateId and id groups