Fix bug: cannot submit if automode is disabled