minor:  fix bug when toggling fails