Fix bug in saving textinput.