fixed index problem 2