Fixed bug with toggle() method