Fixed an issue with connect/disconnect feature.