visibleToggle function bug fixed