     #then a row for row header headers
     if opts.rows.length !=0
         tr = $("<tr>")
-        for i, r of opts.rows
+        for own i, r of opts.rows
             tr.append $("<th class='pvtAxisLabel'>").text(r)
         th = $("<th>")
         if opts.cols.length ==0

    totals = {rows:{}, cols:{}, all: opts.aggregator()}
    forEachRow input, opts.derivedAttributes, (row) ->
        if opts.filter(row)
            cA = (row[x] for x in opts.cols)
            c = cA.join("-")
            rA = (row[x] for x in opts.rows)
            r = rA.join("-")
            totals.all.push row
            if r != ""

                subopts.postProcessor = opts.effects[effect]

        pivotTable.pivot(input,subopts)

    #the very first refresh will actually display the table
    refresh()

