fixed bug in text input.