Fixed index exception.