Bugfix: error on sending disconnect event caused the switch button failure.