Fixed toggle bug