template's ids should be unique