Fixed bug when an input field is not in a form