Fixed ArrayIndexOutOfBoundsException.