fixed bugs with text input