Fixing the form submission prevention