     world
 
   _from_dict: (dict) ->
-    label = dict[LABEL] or "#{@get(LABEL)}:#{@get(CHILDREN).length()}"
+    label = dict[LABEL] or "#{@get(LABEL)}:#{@_child_count()}"
     world = @_spawn_world label
     world.import_dict dict
 

    child
    
  find_children: (label) ->
    return @get(CHILDREN).all() unless label?
    result = []
    for child in @get(CHILDREN).all()
      result.push child if child.label() == label
    result
    
  find_child: (label) ->
    @find_children(label)[0]

  has_children: ->
    @get(CHILDREN).length() > 0
    
  map_children: (callback) ->
    result = @rx().array()
    for child in @get(CHILDREN).all()
      result.push callback(child)
    result
  

        assert _.isObject(value), "authority isn't dictionary"
        authority = @_from_dict(value)
        @put(AUTHORITY, authority)
      else if key == CHILDREN and !_.isFunction(value)
        for child in value
          assert child, 'import child'
          @add_child child
