         directive : directive
       }
       $scope.panelStack = [panelDescriptor]
-      $scope.finish()
+
 
     $scope.finish = (error)->
 
-      #console.log("Watchers")
-      #console.log($scope.$$watchers)
-      # Interesting
-      # Without this $scope.$apply the form is loaded really slowly
-      # or not at all.
-      #$scope.$apply( ()->
       $scope.log("finish")
       $scope.loading = false
-      $scope.errors.push(error) if error
+      $scope.errors = [error] if error
       throw new Error(error) if error
-      #)
 
     if $scope.csWizardOptions
 

    overriden_resource_descriptors = {}

    $scope.resource_descriptor = (panel) ->
      if overriden_resource_descriptors[panel.resource.descriptor.type]
        return overriden_resource_descriptors[panel.resource.descriptor.type]
      else

        $scope.panelStack[0].item = $scope.csWizardOptions['form-item']

    $scope.$watchCollection 'panelStack', (newPanelStack, oldPanelStack) ->

      if newPanelStack
        attrs.$set 'numberOfPanels', newPanelStack.length
        $scope.numberOfPanels = newPanelStack.length
      else
        $scope.log("NotPanelStack")

    # ===== LIFECYCLE EVENTS ==============================

