Form stuck after clicking "submit"