diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/RelationPartSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/RelationPartSpans.java
index 04af3e5..03b2f9c 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/RelationPartSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/RelationPartSpans.java
@@ -254,12 +254,19 @@
                     id = matcheeSpans.getSpanId();
                 }
 
-                if (!inverse && r.getRightId() == id) {
-                    r.sortRight = false;
-                    candidateRelations.add(r);
-                } else if (inverse && r.getLeftId() == id) {
-                    r.sortRight = true;
-                    candidateRelations.add(r);
+                //if (!inverse && r.getRightId() == id) {
+                if (!inverse){
+                    if (matchRight && r.getRightId() == id ||
+                            !matchRight && r.getLeftId() == id){
+                        r.sortRight = false;
+                        candidateRelations.add(r);
+                    }                
+                } else if (inverse) {// && r.getLeftId() == id) {
+                    if (matchRight && r.getRightId() == id ||
+                            !matchRight && r.getLeftId() == id){
+                        r.sortRight = true;
+                        candidateRelations.add(r);
+                    }
                 }
                 i++;
             } else if (endPos <= matcheeSpans.end()) {
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
index 81c3d67..4bc4355 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
@@ -288,12 +288,6 @@
 		kr = ki.search(wq,(short) 20);
 		assertEquals((long) 12, kr.getTotalResults());
 		
-		/*for (KorapMatch km : kr.getMatches()){		
-			System.out.println(km.getStartPos() +","+km.getEndPos()
-			//	+" "+km.getSnippetBrackets()
-			);
-		}*/		
-		
 		// child-of with attr func-obj
 		wq = new SpanWithAttributeQuery(srq, 
 				new SpanAttributeQuery( 
@@ -334,6 +328,67 @@
 		
 	}
 	
+	@Test
+    public void testCase10() throws IOException {
+        ki.addDoc(createFieldDoc2());
+        ki.commit();
+        
+        // return all children that are NP
+        SpanRelationPartQuery rv = new SpanRelationPartQuery(
+                new SpanRelationQuery(
+                        new SpanTermQuery(new Term("base",">:child-of")),true
+                ), 
+                new SpanElementQuery("base","np"), 
+                false, false, true); 
+                
+        kr = ki.search(rv,(short) 10);
+        
+        assertEquals(4, kr.getTotalResults());
+        assertEquals(0,kr.getMatch(0).getStartPos());
+        assertEquals(1,kr.getMatch(0).getEndPos());
+        assertEquals(2,kr.getMatch(1).getStartPos());
+        assertEquals(4,kr.getMatch(1).getEndPos());
+        assertEquals(2,kr.getMatch(2).getStartPos());
+        assertEquals(7,kr.getMatch(2).getEndPos());
+        assertEquals(5,kr.getMatch(3).getStartPos());
+        assertEquals(7,kr.getMatch(3).getEndPos());
+        
+        // return all parents that are NP
+        rv = new SpanRelationPartQuery(
+                new SpanRelationQuery(
+                        new SpanTermQuery(new Term("base",">:child-of")),true
+                ), 
+                new SpanElementQuery("base","np"), 
+                true, true, true); 
+                
+        kr = ki.search(rv,(short) 10);
+
+        assertEquals(7, kr.getTotalResults());
+        assertEquals(0,kr.getMatch(0).getStartPos());
+        assertEquals(1,kr.getMatch(0).getEndPos());
+        assertEquals(2,kr.getMatch(1).getStartPos());
+        assertEquals(4,kr.getMatch(1).getEndPos());
+        assertEquals(2,kr.getMatch(2).getStartPos());
+        assertEquals(4,kr.getMatch(2).getEndPos());
+        assertEquals(2,kr.getMatch(3).getStartPos());
+        assertEquals(7,kr.getMatch(3).getEndPos());
+        assertEquals(2,kr.getMatch(4).getStartPos());
+        assertEquals(7,kr.getMatch(4).getEndPos());
+        assertEquals(5,kr.getMatch(5).getStartPos());
+        assertEquals(7,kr.getMatch(5).getEndPos());
+        assertEquals(5,kr.getMatch(6).getStartPos());
+        assertEquals(7,kr.getMatch(6).getEndPos());     
+        
+//       for (KorapMatch km : kr.getMatches()){        
+//            System.out.println(km.getStartPos() +","+km.getEndPos()
+//                    //  +" "+km.getSnippetBrackets()
+//            );
+//       }  
+    
+
+   }
+	
+	
 	/** Relation with variable
 	 * 	match right, return left
 	 * 	sort by right, then sort by left
