fix toggle button state