Fixed index logic.