fix toggle switch control