             else
                 unused.addClass('pvtHorizList')
 
-            for own i, attr of shownAttributes
+            for own i, attr of shownInDragDrop
                 do (attr) ->
                     values = (v for v of attrValues[attr])
                     hasExcludedItem = false

            #set up the UI initial state as requested by moving elements around

            for x in opts.cols
                @find(".pvtCols").append @find(".axis_#{$.inArray(x, shownAttributes)}")
            for x in opts.rows
                @find(".pvtRows").append @find(".axis_#{$.inArray(x, shownAttributes)}")
            if opts.aggregatorName?
                @find(".pvtAggregator").val opts.aggregatorName
            if opts.rendererName?

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

