First template is updated then index created