fixes bug with text input