fix double-submit bug