Fix bug with form submit