Correcting bug in Switch Buttons