Fixed toggle() not working when argument show was specified

Fix for issue #308