Fix "OutOfBounds" exception.