 
             if not isNaN(unusedAttrsVerticalAutoCutoff)
                 attrLength = 0
-                attrLength += a.length for a in shownAttributes
+                attrLength += a.length for a in shownInDragDrop
                 unusedAttrsVerticalAutoOverride = attrLength > unusedAttrsVerticalAutoCutoff
 
             if opts.unusedAttrsVertical == true or unusedAttrsVerticalAutoOverride

            else
                unused.addClass('pvtHorizList')

            for own i, attr of shownAttributes
                do (attr) ->
                    values = (v for v of attrValues[attr])
                    hasExcludedItem = false

                            .addClass('pvtAttrDropdown')
                            .append($("<option>"))
                            .bind "change", -> refresh()
                        for attr in shownInAggregators
                            newDropdown.append($("<option>").val(attr).text(attr))
                        pvtVals.append(newDropdown)

