                 }
                 
                 // Null out automatically assigned ChannelSet on agent; if manually assigned leave it alone.
-                if (agent.mx_internal::channelSetMode == MessageAgent.mx_internal::AUTO_CONFIGURED_CHANNELSET)
-                    agent.mx_internal::internalSetChannelSet(null);
+                if (agent.channelSetMode == MessageAgent.AUTO_CONFIGURED_CHANNELSET)
+                    agent.internalSetChannelSet(null);
             }
         }
     }

        {
            _shouldBeConnected = true;
            _messageAgents.push(agent);
            agent.mx_internal::internalSetChannelSet(this);
            // Wire up agent's channel event listeners to this ChannelSet.
            addEventListener(ChannelEvent.CONNECT, agent.channelConnectHandler);
            addEventListener(ChannelEvent.DISCONNECT, agent.channelDisconnectHandler);

                for (var i:int = 0; i < _messageAgents.length; i++)
                {
                    ma = MessageAgent(_messageAgents[i]);
                    ma.setAuthenticated(value, creds);
                } 
            }
            
