Fixed another rare IndexOutOfBounds exception.