fix ArrayIndexOutOfBounds