fixed error with page reload on form submit