fixed toggle button bug