         while (s == 0) or r[n].section_identify != "END\0"
           try
             n = "section_#{s}"
-            [r[n], i] = @_loadRiteSection(arrayBuf, i)
+            [r[n], i] = @_loadRiteSection(ctx, arrayBuf, i)
             s += 1
-          catch
+          catch error
             break
         if arrayBuf.byteLength > i
           m.push("Found #{arrayBuf.byteLength - i} bytes junk after END section")

    # Big-endian
    (a[0] << 8) | a[1]

  _loadRiteBinaryHeader: (arrayBuf, offset) ->
    h = new Uint8Array(arrayBuf, offset, 22)
    [{
      binary_identify: String.fromCharCode.apply(null, h.subarray(0, 4))
      binary_version: String.fromCharCode.apply(null, h.subarray(4, 8))
      binary_crc: _bin_to_u16_be(h.subarray(8, 10))
      binary_size: _bin_to_u32_be(h.subarray(10, 14))
      compiler_name: String.fromCharCode.apply(null, h.subarray(14, 18))
      compiler_version: String.fromCharCode.apply(null, h.subarray(18, 22))
    }, offset + h.byteLength]

  _loadRiteSection: (arrayBuf, offset) ->
    h = new Uint8Array(arrayBuf, offset, 8)
    r = {
      offset: offset
      section_identify: String.fromCharCode.apply(null, h.subarray(0, 4))
      section_size: _bin_to_u32_be(h.subarray(4, 8))
    }
    h = new Uint8Array(arrayBuf, offset + 8, r.section_size - 8)
    switch r.section_identify
      when "IREP"
        r.rite_version = String.fromCharCode.apply(null, h.subarray(0, 4))
        @_loadIrepRecord(r, h.subarray(4), offset + 4)
      when "LVAR"
        r.syms_len = _bin_to_u32_be(h.subarray(0, 4))
        r.record = []
        i = 4
        n = 0
        while n < r.syms_len
          l = _bin_to_u16_be(h.subarray(i, i + 2))
          i += 2
          r.record.push(
            {symbol: String.fromCharCode.apply(null, h.subarray(i, i + l))}
          )
          i += l
          n += 1
        while i < r.section_size
          n = _bin_to_u16_be(h.subarray(i, i + 2))
          r.record[n]?.lv = _bin_to_u16_be(h.subarray(i + 2, i + 4)) if n < 0xffff

      r = {}
      m = []
      i = 0
      ctx = {}
      [r.rite_binary_header, i] = @_loadRiteBinaryHeader(ctx, arrayBuf, i)
      if r.rite_binary_header.binary_identify == "RITE" and
         r.rite_binary_header.binary_version == "0003"
        s = 0
