fix bug in $Element.toggle