some fixes for multiple-mode textinput