           cursor = container.find selector
           count = cursor.count()
           if cursor.count() > @stackAfter
-            Blaze.With (=> type: @, stack: value, count: count), =>
+            Blaze.With (new ui.ComponentStack type: @, stack: value, count: count), =>
               @getCounterTemplate count, container.rules.name
           else
-            for i in [1..count]
-              Blaze.With (=> type: @, stack: value, i: i), =>
+            Blaze.With (type: @, stack: value, container: container), =>
+              Blaze.Each (-> cursor), =>
                 @getCounterTemplate count, container.rules.name
     else
       new Blaze.Template =>

        cursor = container.find type: @name
        count = cursor.count()
        if cursor.count() > @stackAfter
          Blaze.With (=> type: @, count: count), =>
            @getCounterTemplate count, container.rules.name
        else
          for i in [1..count]
            Blaze.With (=> type: @, i: i), =>
              @getCounterTemplate count, container.rules.name

class ui.Controller extends EventEmitter

      else
        rules = component.game().rules
        Template["#{rules.replace /\s/g, ''}ComponentView"] ? Template.componentDefaultView
      Blaze.With (type: @, component: component), ->
        Blaze.With component, -> template

  summary: (count, stack) ->
    if stack?
