Fixed connect/disconnect button logic.