Fixed toggle functionality