fixed the toggling