             calculateStats()
 
     calculateStoryPoints = (selectedUserStories) ->
-        defered = $q.defer()
-
-        gm.utils.defer ->
-            total = 0
-
-            for us in selectedUserStories
-                for roleId, pointId of us.points
-                    pointsValue = $scope.constants.points[pointId].value
-                    if pointsValue is null
-                        pointsValue = 0
-                    total += pointsValue
-
-            defered.resolve(total)
-
-        return defered.promise
+        total = 0
+
+        if not selectedUserStories?
+            return 0
+
+        for us in selectedUserStories
+            for roleId, pointId of us.points
+                pointsValue = $scope.constants.points[pointId].value
+                if pointsValue is null
+                    pointsValue = 0
+                total += pointsValue
+
+        return total
 
     getSelectedUserStories = ->
         selected = _.filter($scope.unassingedUs, "selected")


    $scope.changeUserStoriesSelection = ->
        selected = $scope.selectedUserStories = getSelectedUserStories()

        promise = calculateStoryPoints(selected)
        promise.then (points) ->
            $scope.selectedStoryPoints = points

    $scope.$on("points:loaded", loadUserStories)
    $scope.$on("userstory-form:create", loadUserStories)


    # Signal Handlign
    $scope.$on("sortable:changed", resortUserStories)
    $scope.$on("sortable:changed", ->
        selected = $scope.selectedUserStories = getSelectedUserStories()
        $scope.selectedStoryPoints = calculateStoryPoints(selected)
    )


BacklogUserStoryModalController = ($scope, $rootScope, $gmOverlay, rs, $gmFlash) ->
