Fixed missing index bug on rotated indices