fix clearing of input field