         router.handleRoute "/Stack-Editor/#{template.getId()}"
 
       when 'Initialize'
-          return @onMenuItemClickError 'initializing', template.getId()  if err
         template.generateStack { verify: yes }, (err, res) =>
+          return @onMenuItemClickError 'initializing', err, template.getId()  if err
           { stack } = res
           router.handleRoute "/Stack-Editor/#{template.getId()}/#{stack.getId()}"
           appManager.tell 'Stackeditor', 'reloadEditor', template.getId(), stack.getId()


      when 'Make Team Default'
        computeController.fetchStackTemplate template.getId(), (err, template) =>
          return @onMenuItemClickError 'making team default'  if err
          if template
            computeController.makeTeamDefault template

      when 'Share With Team'
        computeController.fetchStackTemplate template.getId(), (err, template) =>
          return @onMenuItemClickError 'sharing'  if err
          if template
            computeController.setStackTemplateAccessLevel template, 'group'

      when 'Make Private'
        computeController.fetchStackTemplate template.getId(), (err, template) =>
          return @onMenuItemClickError 'cloning'  if err
          if template
            computeController.setStackTemplateAccessLevel template, 'private'



      when 'Reinitialize', 'Update'
        computeController.reinitStack stack, (err, newStack) =>
          return @onMenuItemClickError 'reinitializing', err, template.getId()  if err
          appManager.tell 'Stackeditor', 'reloadEditor', template.getId(), newStack.stack.getId()

      when 'Clone'
        computeController.fetchStackTemplate template.getId(), (err, template) =>
          return @onMenuItemClickError 'cloning', err  if err
          template.clone (err, template) =>
            return @onMenuItemClickError 'cloning', err  if err
            router.handleRoute "/Stack-Editor/#{template.getId()}"

      when 'Destroy VMs'
        computeController.ui.askFor 'deleteStack', {}, (status) =>
          return  unless status.confirmed
          computeController.destroyStack stack, (err) =>
            return @onMenuItemClickError 'destroying', err  if err
          , followEvents = no

      when 'Delete'
