                                 child.forIdentity identity, _try
                             
                             # 2. the prefix of name matches child.id
-                            else if name.substr(0, id.length) is id
+                            else if name.substr(0, name.indexOf '.') is id
                                 
                                 @logger.debug 'searching for %s in %s', name.substr(id.length+1), child.ID
         

                
            return @
        
        
        ##
        ##
        ##
        _message: (msg)->
            
            @logger.info 'message recived:', msg

            @_emit 'message:'+msg.topic



events = require 'events'

ACTIONS = ['configured', 'booted', 'started', 'running', 'shutdown', 'stopped']

USELOOKUPSCACHE = false
LOOKUPSCACHE = {}
