Merge "Fix IndexOutOfBoundsException."