fixing the toggle button