                   saveDatum(info, v) if r
                   return
               else if !isNaN(v = parseInt(value, 10))
-                if v != info.d.id
+                if v != info.d?.id
                   setRecord(info, volume.records[v])
               return
             when 'metric'


        # Add all the measure tds to row i for count n, record r
        generateRecord = (info) ->
          ms = info.cols.metrics
          return unless l = ms.length
          t = info.count
          if td = generateMultiple(info)
            unless info.hasOwnProperty('n')
              cls = info.p
              for n in [0..t-1] by 1
                td.classList.add(cls + info.row.get(info.c, n).id)
            return
          pre = ID + '-' + info.i + '_'

        generateAdd = (info, td) ->
          width = info.cols.metrics.length
          info.m = info.cols.start
          if typeof info.metric.id == 'number' && info.metric.name != 'indicator'
            info.id = ID+'-'+info.i+'_'+info.cols.start+(if info.hasOwnProperty('n') then '_'+info.n else '')
            generateCell(info)
            info.tr.insertBefore(info.cell, td)
