fixed index exception