finally fixed the toggle control problem!