             td.id = i
           td
 
-        generateMultiple = (cat, cols, row, i, n, t) ->
+        generateMultiple = (cat, cols, row, i, n, t, m) ->
           if n == undefined
             return if t == 1
           else

                td.appendChild(document.createTextNode(cat.not))
              else if editing
                td.appendChild(document.createTextNode("add " + cat.name))
              if edit
                td.className = 'null add'
                td.id = id + '-add_' + i + '_' + cat.id
          td

            metrics.pop() # remove 'id' (necessarily last)
            metrics = _.map metrics, getMetric
            # add back the 'id' column first if needed
            if !metrics.length
              metrics.unshift(pseudoMetric.id)
            si = metricCols.length
            metricCols.push.apply metricCols, _.map metrics, (m) ->
