Fixing auto-submit bug; preventing duplicate data submissions