Fixes some notices after submitting a form.