Minor fix for foundries in orth
diff --git a/src/main/java/de/ids_mannheim/korap/KorapQuery.java b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
index 582e2a0..9f3a94c 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
@@ -663,7 +663,7 @@
 	    };
 
 	    // Ignore foundry for orth layer
-	    if (layer.equals("s"))
+	    if (layer.equals("s") || layer.equals("i"))
 		value.setLength(0);
 
 	    value.append(layer).append(':');
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
index 4ac40d9..e8d8084 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
@@ -293,6 +293,15 @@
 	assertEquals(sqwi.toQuery().toString(), "tokens:s:Baum");
     };
 
+    @Test
+    public void queryJSONfoundryForOrthBug2 () throws QueryException {
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bugs/foundry_for_orth_2.jsonld").getFile());
+
+	// baum/i
+	assertEquals(sqwi.toQuery().toString(), "tokens:i:baum");
+    };
+
+
 
     @Test
     public void queryJSONunderspecifiedTokenBug () {
diff --git a/src/test/resources/queries/bugs/foundry_for_orth_2.jsonld b/src/test/resources/queries/bugs/foundry_for_orth_2.jsonld
new file mode 100644
index 0000000..f294a6c
--- /dev/null
+++ b/src/test/resources/queries/bugs/foundry_for_orth_2.jsonld
@@ -0,0 +1,14 @@
+{
+  "@context":"http://ids-mannheim.de/ns/KorAP/json-ld/v0.2/context.jsonld",
+  "query":{
+    "@type" : "korap:token",
+    "wrap" : {
+      "@type" : "korap:term",
+      "caseInsensitive" : true,
+      "foundry" : "opennlp",
+      "key" : "baum",
+      "layer" : "orth",
+      "match" : "match:eq"
+    }
+  }
+}