Fix clearing the text field when submitted