Added code for trying to add indices to leader.