fix auto-toggle on untoggle bug