Update element index.