Fixing the submit handler mis fire