fixed toggle button problem