Remove unnecessary index var