 
         $scope.tags = tags
 
-    filterUsBySelectedTags = ->
-        selectedTags = _.filter($scope.tags, "selected")
-        selectedTagsIds = _.map(selectedTags, "name")
-
-        if selectedTagsIds.length > 0
-            _.each $scope.unassingedUs, (item) ->
-                itemTagIds = _.map(item.tags, (tag) -> tag)
-                interSection = _.intersection(selectedTagsIds, itemTagIds)
+
+     filterUsBySelectedTags = ->
+        selectedTags = _($scope.tags)
+                             .filter("selected")
+                             .map("name")
+                             .value()
+
+        if selectedTags.length > 0
+            for item in $scope.unassingedUs
+                itemTags = item.tags
+                interSection = _.intersection(selectedTags, itemTags)
 
                 if interSection.length == 0
                     item.__hidden = true

                    item.__hidden = false

        else
            _.each($scope.unassingedUs, (item) -> item.__hidden = false)

    resortUserStories = ->
        # Normalize user stories array

        # Calculte new stats
        calculateStats()

        for item in $scope.unassingedUs
            item.save() if item.isModified()


    $q.all([
        rs.getUsers($scope.projectId),
