                     return
 
                 itemUs = ui.item.scope().us
-                itemIndex = ui.item.index()
+                itemIndex = getUsIndex(ui.item)
 
                 deleteElement(ui.item)
 

    # helper-in-wrong-place-when-scrolled-down-page

    link = ($scope, $el, $attrs) ->
        bindOnce $scope, "project", (project) ->
            # If the user has not enough permissions we don't enable the sortable
            if not (project.my_permissions.indexOf("modify_us") > -1)

                    return $(item).index()

                index = _.min _.map items, (item) ->
                    return getUsIndex(item)

                us = _.map items, (item) ->
                    item = $(item)
