fix the input field losing focus