ArrayOutOfBounds fix