minor fix of bug in toggle button