fix bug about autoreset