Fix characters arrive in the wrong order when using mobile text input application