Fix a couple of bugs on the form, and add a reset button