fixing toggle switch