fixed index problem