     currentGroup = getGroup()
     { viewType } = @getOptions()
 
-    stackTemplates.map (template) ->
+    stackTemplates.map (template) =>
       template.isDefault       = template._id in (currentGroup.stackTemplates or [])
-      template.inUse           = Boolean stacks.find (stack) -> stack.baseStackId is template._id
+      template.inUse           = @isTemplateInUse stacks, template
       template.canForcedReinit = canEditGroup and template.accessLevel is 'group'
 
     if viewType is 'group'

    return stackTemplates


  destroy: ->

    { computeController, groupsController } = kd.singletons


    return  unless target

    kd.singletons.computeController.fetchStacks (err, stacks) =>

      return showError  if err

      stackTemplate.inUse = @isTemplateInUse stacks, stackTemplate

      target.setData stackTemplate
      target.handleLabelStates()


  handleRenderStacks: (stacks) ->
