diff --git a/Changes b/Changes
index eb05c00..d3286a4 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.55.7 2016-11-06
+0.55.7 2016-11-11
         - [bugfix] Throw error on optional operands in distance
           queries (diewald)
         - [performance] Remember solved problematic queries in the
@@ -13,6 +13,7 @@
         - [bugfix] Warn on empty elements in positional queries (diewald)
         - [bugfix] Fix wrong deserialization test with negative element in
           positional queries (diewald)
+        - [bugfix] Fix empty element match visualizations (diewald)
 
 0.55.6 2016-08-10
         - [bugfix] distance with key "t" uses default foundry (diewald)
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
index 44ac329..dcd59d3 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
@@ -142,7 +142,7 @@
 
             this.payloadTypeIdentifier = bb.get(0);
 
-            if (payloadTypeIdentifier == PayloadTypeIdentifier.ELEMENT.value) {
+			if (payloadTypeIdentifier != PayloadTypeIdentifier.MILESTONE.value) {
 				this.matchEndPosition = bb.getInt(9);
 			};
 
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 0c89010..4af1618 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Match.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Match.java
@@ -943,7 +943,7 @@
                     pos = clean.length() - 1;
                 };
 
-                snippetArray.addString(clean.substring(oldPos, pos));
+				snippetArray.addString(clean.substring(oldPos, pos));
 
                 oldPos = pos;
             };
@@ -956,7 +956,7 @@
             };
         };
 
-        if (clean.length() > pos) {
+        if (clean.length() > pos && pos >= 0) {
             snippetArray.addString(clean.substring(pos));
         };
     };
@@ -975,52 +975,52 @@
             log.trace("Create HTML Snippet");
 
         StringBuilder sb = new StringBuilder();
+		StringBuilder rightContext = new StringBuilder();
 
         // Snippet stack sizes
         short start = (short) 0;
         short end = this.snippetArray.size();
-        end--;
 
-        // Set levels for highlights 
-        FixedBitSet level = new FixedBitSet(255);
-        level.set(0, 255);
-        byte[] levelCache = new byte[255];
-
-        // First element of sorted array
-        HighlightCombinatorElement elem = this.snippetArray.getFirst();
-
-		// Untested
-		if (elem == null)
-			return null;
-		
-        // Create context
+		// Create context
         sb.append("<span class=\"context-left\">");
         if (this.startMore)
             sb.append("<span class=\"more\"></span>");
 
-        // First element is textual
-        if (elem.type == 0) {
-            sb.append(elem.toHTML(this, level, levelCache));
-            // Move start position
-            start++;
-        };
-        sb.append("</span>");
+		// Set levels for highlights 
+		FixedBitSet level = new FixedBitSet(255);
+		level.set(0, 255);
+		byte[] levelCache = new byte[255];
 
-        // Last element of sorted array
-        elem = this.snippetArray.getLast();
+		HighlightCombinatorElement elem;
 
-        StringBuilder rightContext = new StringBuilder();
+		end--;
+		if (end > 0) {
 
-        // Create right context, if there is any
-        rightContext.append("<span class=\"context-right\">");
+			// First element of sorted array
+			elem = this.snippetArray.getFirst();
 
-        // Last element is textual
-        if (elem != null && elem.type == 0) {
-            rightContext.append(elem.toHTML(this, level, levelCache));
+			// First element is textual
+			if (elem.type == 0) {
+				sb.append(elem.toHTML(this, level, levelCache));
+				// Move start position
+				start++;
+			};
+			sb.append("</span>");
 
-            // decrement end
-            end--;
-        };
+			// Last element of sorted array
+			elem = this.snippetArray.getLast();
+
+			// Create right context, if there is any
+			rightContext.append("<span class=\"context-right\">");
+
+			// Last element is textual
+			if (elem != null && elem.type == 0) {
+				rightContext.append(elem.toHTML(this, level, levelCache));
+
+				// decrement end
+				end--;
+			};
+		};
 
 		if (this.endMore)
             rightContext.append("<span class=\"more\"></span>");
diff --git a/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java b/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
index a749606..9bfbfae 100644
--- a/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
+++ b/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
@@ -445,7 +445,7 @@
 
 		km = kr.getMatch(3);
 		assertEquals(
-			"",
+			"<span class=\"context-left\"><span class=\"match\"></span></span>",
 			km.getSnippetHTML());
 
 	};
