Fixed ArrayIndexOfBoundsException.