diff --git a/dev/js/spec/matchSpec.js b/dev/js/spec/matchSpec.js
index 2004d4f..1a4bd2b 100644
--- a/dev/js/spec/matchSpec.js
+++ b/dev/js/spec/matchSpec.js
@@ -486,7 +486,7 @@
     it('should parse into a table (async)', function () {
       expect(table).toBeTruthy();
 
-      expect(table.length()).toBe(4);
+      expect(table.length()).toBe(5);
 
       expect(table.getToken(0)).toBe("meist");
       expect(table.getToken(1)).toBe("deutlich");
@@ -518,9 +518,10 @@
       expect(tr.children[3].classList.contains('mark')).toBeTruthy();
       expect(tr.children[4].firstChild.nodeValue).toBe('leistungsfähiger');
       expect(tr.children[4].classList.contains('mark')).toBeFalsy();
-      expect(tr.children[4].hasAttribute("title").toBeFalsy();
+      expect(tr.children[4].hasAttribute("title")).toBeFalsy();
       expect(tr.children[5].firstChild.nodeValue).toBe(longString);
       expect(tr.children[5].getAttribute("title")).toBe(longString);
+      expect(tr.children[6].classList.contains('cutted')).toBeTruthy();
 
       // first row
       tr = e.children[1].children[0];
diff --git a/dev/js/spec/queryCreatorSpec.js b/dev/js/spec/queryCreatorSpec.js
index 5c5cddf..70f3f34 100644
--- a/dev/js/spec/queryCreatorSpec.js
+++ b/dev/js/spec/queryCreatorSpec.js
@@ -101,6 +101,40 @@
 };
 
 
+function matchTableCuttedFactory () {
+  var table = document.createElement('div');
+  table.className = 'matchtable';
+  table.innerHTML = 
+    "    <table>" +
+    "      <thead>" +
+    "        <tr>" +
+    "          <th>Foundry</th>" +
+    "          <th>Layer</th>" +
+    "          <th>Baum</th>" +
+    "          <th class=\"cutted\"></th>" +
+    "        </tr>" +
+    "      </thead>" +
+    "      <tbody>" +
+    "        <tr tabindex=\"0\">" +
+    "          <th>corenlp</th>" +
+    "          <th>p</th>" +
+    "          <td>NN</td>" +
+    "          <td></td>" +
+    "        </tr>" +
+    "        <tr tabindex=\"0\">" +
+    "          <th>opennlp</th>" +
+    "          <th>p</th>" +
+    "          <td>NN</td>" +
+    "          <td></td>" +
+    "        </tr>" +
+    "      </tbody>" +
+    "    </table>";
+  var info = document.createElement('div');
+  info.appendChild(table);
+  return table;
+};
+
+
 define(['match/querycreator'], function (qcClass) {
 
   describe('KorAP.QueryCreator', function () {
@@ -599,5 +633,24 @@
       expect(cell.classList.contains("mark")).toBeTruthy();
       expect(cell.classList.contains("chosen")).toBeFalsy();
     });
+
+    it('should ignore cutted columns', function () {
+      var matchTable = matchTableCuttedFactory();
+      var qc = qcClass.create(matchTable);
+      expect(qc.toString()).toEqual("");
+
+      var cell = matchTable.querySelector("thead > tr > th:nth-child(3)");
+      expect(cell.classList.contains("chosen")).toBeFalsy();
+      cell.click();
+      expect(cell.classList.contains("chosen")).toBeTruthy();
+      expect(qc.toString()).toEqual("[orth=Baum]");
+
+      cell = matchTable.querySelector("thead > tr > th:nth-child(4)");
+      expect(cell.classList.contains("chosen")).toBeFalsy();
+      expect(cell.classList.contains("cutted")).toBeTruthy();
+      cell.click();
+      expect(cell.classList.contains("chosen")).toBeFalsy();
+      expect(qc.toString()).toEqual("[orth=Baum]");
+    });
   });
 });
diff --git a/dev/js/src/match/querycreator.js b/dev/js/src/match/querycreator.js
index d7c5edf..e54ff65 100644
--- a/dev/js/src/match/querycreator.js
+++ b/dev/js/src/match/querycreator.js
@@ -192,6 +192,11 @@
           // The head is in the top row
           if (target.parentNode.parentNode.tagName == 'THEAD') {
 
+            // Ignore cutted field
+            if (target.classList.contains("cutted")) {
+              return;
+            }
+
             var i = -2;
             var sib = target;
             while ((sib = sib.previousSibling) != null) {
diff --git a/dev/js/src/match/table.js b/dev/js/src/match/table.js
index 61c100a..e2e49cc 100644
--- a/dev/js/src/match/table.js
+++ b/dev/js/src/match/table.js
@@ -35,6 +35,7 @@
       this._token = [];
       this._mark = [];
       this._markE = undefined;
+      this._cutted = -1;
       this._info = [];
       this._foundry = {};
       this._layer = {};
@@ -122,7 +123,7 @@
             newMark = true;
           }
 
-          else if (c.getAttribute("title") &&
+          else if (c.hasAttribute("title") &&
               _TermRE.exec(c.getAttribute("title"))) {
 
             // Fill position with info
@@ -158,7 +159,13 @@
             if (this._layer[layer] === undefined)
               this._layer[layer] = {};
             this._layer[layer][foundry] = 1;
-          };
+          }
+
+          // The current position marks a cut
+          else if (c.hasAttribute("class") && c.getAttribute("class") == "cutted") {
+            this._cutted = this._pos;
+            this._token[this._pos++] = "";            
+          }
 
           // depth search
           if (c.hasChildNodes())
@@ -251,6 +258,9 @@
           if (this._markE === undefined) {
             this._markE = c;
           };
+        }
+        else if (i == this._cutted) {
+          c.classList.add('cutted');
         };
 
         // In case the title is very long - add a title attribute
