 
     $scope.changeUserStoriesSelection = ->
         selected = $scope.selectedUserStories = getSelectedUserStories()
-
-        promise = calculateStoryPoints(selected)
-        promise.then (points) ->
-            $scope.selectedStoryPoints = points
+        $scope.selectedStoryPoints = calculateStoryPoints(selected)
 
     $scope.$on("points:loaded", loadUserStories)
     $scope.$on("userstory-form:create", loadUserStories)

            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

    getSelectedUserStories = ->
        selected = _.filter($scope.unassingedUs, "selected")


    # 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) ->
