Fix issue Switch setIsOn.