Fixed toggle bug with search bar