diff --git a/Changes b/Changes
index a562e4c..78efcbf 100644
--- a/Changes
+++ b/Changes
@@ -9,6 +9,7 @@
 	  constraint (diewald)
 	- [bugfix] Mirror collection (diewald)
 	- [bugfix] Updated default fields for meta data (diewald)
+	- [bugfix] Updated match identifier for "sigle" data (diewald)
 
 0.51 2015-03-17
         - This is a major version (prepared for the GitHub release)
diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index ebcc32c..25dfd0d 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -1241,9 +1241,12 @@
         fields.add(field);
 
         // Some initializations ...
-        int i = 0, startIndex = kr.getStartIndex(), count = kr
-                .getItemsPerPage(), hits = kr.getItemsPerPage() + startIndex, limit = meta
-                .getLimit(), itemsPerResourceCounter = 0;
+        int i = 0;
+        int startIndex = kr.getStartIndex();
+        int count = kr.getItemsPerPage();
+        int hits = kr.getItemsPerPage() + startIndex;
+        int limit = meta.getLimit();
+        int itemsPerResourceCounter = 0;
         boolean cutoff = meta.doCutOff();
         short itemsPerResource = meta.getItemsPerResource();
 
diff --git a/src/main/java/de/ids_mannheim/korap/response/Match.java b/src/main/java/de/ids_mannheim/korap/response/Match.java
index 90285dc..272a027 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Match.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Match.java
@@ -651,11 +651,18 @@
         if (this.localDocID == -1)
             return null;
 
+
         MatchIdentifier id = this.getMatchIdentifier();
 
         // Get prefix string corpus/doc
-        id.setCorpusID(this.getCorpusID());
-        id.setDocID(this.getDocID());
+        if (this.getTextSigle() != null) {
+            id.setTextSigle(this.getTextSigle());            
+        }
+        // LEGACY
+        else {
+            id.setCorpusID(this.getCorpusID());
+            id.setDocID(this.getDocID());
+        };
 
         return (this.identifier = id.toString());
     };
diff --git a/src/main/java/de/ids_mannheim/korap/response/match/DocIdentifier.java b/src/main/java/de/ids_mannheim/korap/response/match/DocIdentifier.java
index 2526e94..9b16727 100644
--- a/src/main/java/de/ids_mannheim/korap/response/match/DocIdentifier.java
+++ b/src/main/java/de/ids_mannheim/korap/response/match/DocIdentifier.java
@@ -4,28 +4,45 @@
 import java.util.regex.*;
 
 
+// TODO: This should only use textSigle!
+
 public class DocIdentifier {
-    protected String corpusID, docID;
+    protected String
+        textSigle,
+        corpusID, // LEGACY
+        docID;    // LEGACY
 
-
+    // Legacy
     public String getCorpusID () {
         return this.corpusID;
     };
 
 
+    // Legacy
     public void setCorpusID (String id) {
         if (id != null && !id.contains("!"))
             this.corpusID = id;
     };
 
 
+    // Legacy
     public String getDocID () {
         return this.docID;
     };
 
 
+    // Legacy
     public void setDocID (String id) {
         if (id != null && !id.contains("!"))
             this.docID = id;
     };
+
+    public String getTextSigle () {
+        return this.textSigle;
+    };
+
+    public void setTextSigle (String id) {
+        if (id != null && !id.contains("!"))
+            this.textSigle = id;
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/response/match/MatchIdentifier.java b/src/main/java/de/ids_mannheim/korap/response/match/MatchIdentifier.java
index 5f13a3b..7247d17 100644
--- a/src/main/java/de/ids_mannheim/korap/response/match/MatchIdentifier.java
+++ b/src/main/java/de/ids_mannheim/korap/response/match/MatchIdentifier.java
@@ -8,7 +8,7 @@
 
     private ArrayList<int[]> pos = new ArrayList<>(8);
 
-    Pattern idRegex = Pattern.compile("^match-(?:([^!]+?)!)?"
+    Pattern idRegex = Pattern.compile("^match-(?:([^!]+?)[!\\.])?"
             + "([^!]+)-p([0-9]+)-([0-9]+)"
             + "((?:\\(-?[0-9]+\\)-?[0-9]+--?[0-9]+)*)" + "(?:c.+?)?$");
     Pattern posRegex = Pattern.compile("\\(([0-9]+)\\)([0-9]+)-([0-9]+)");
@@ -22,6 +22,10 @@
         if (matcher.matches()) {
             this.setCorpusID(matcher.group(1));
             this.setDocID(matcher.group(2));
+            // TODO! FIXME!
+
+            this.setTextSigle(this.getCorpusID() + "." + this.getDocID());
+
             this.setStartPos(Integer.parseInt(matcher.group(3)));
             this.setEndPos(Integer.parseInt(matcher.group(4)));
 
@@ -71,19 +75,26 @@
 
 
     public String toString () {
-        if (this.docID == null)
-            return null;
-
         StringBuilder sb = new StringBuilder("match-");
 
+        if (this.docID == null) {
+            if (this.textSigle == null)
+                return null;
+
+            sb.append(this.textSigle);
+        }
+
         // Get prefix string corpus/doc
-        if (this.corpusID != null)
-            sb.append(this.corpusID).append('!');
+        // LEGACY
+        else if (this.corpusID != null) {
+            sb.append(this.corpusID).append('!').append(this.docID);
+        }
+        else {
+            sb.append(this.docID);
+        };
 
-        sb.append(this.docID);
-
-        sb.append('-');
-        sb.append(this.getPositionString());
+        sb.append('-')
+            .append(this.getPositionString());
         return sb.toString();
     };
 
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
index a23c7e3..b53f13a 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
@@ -144,5 +144,6 @@
         assertEquals("Goethe: Maximen und Reflexionen, (1827-1842)", res.at("/matches/0/docTitle").asText());
         assertEquals("1827", res.at("/matches/0/creationDate").asText());
         assertEquals("372-377", res.at("/matches/0/pages").asText());
+        assertEquals("match-GOE_AGX.00002-p7-8", res.at("/matches/0/ID").asText());
     };
 };
