Merge "Fix for IndexOutOfBounds in text pasting." into gingerbread