Fixed an ArrayList.outOfBounds exception.