Fixed the issue where auto form submission was causing errors