fix lost last character when ime changed