fixed index out of bounds exp