Fix small bug in toggle switch