fix form submission in js