out of index exception bug