Update index on every render.
Update index on every render.