diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanElementQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanElementQuery.java
index 1dab433..8746bf8 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanElementQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanElementQuery.java
@@ -20,13 +20,13 @@
 
 /** Matches spans wrapped by an element. */
 public class SpanElementQuery extends SimpleSpanQuery {
-    protected static Term element;
+    //private static Term element;
     private String elementStr;
     
     /** Constructor. */
     public SpanElementQuery (String field, String term) {   
-    	super(new SpanTermQuery(
-    			(element = new Term(field,"<>:"+term))
+    	super(new SpanTermQuery(new Term(field,"<>:"+term)
+    			//(element = new Term(field,"<>:"+term))
     		  ),
     		true
 		);
@@ -50,13 +50,17 @@
 
 	@Override
 	public SimpleSpanQuery clone() {
-		// TODO Auto-generated method stub
-		return null;
+		SpanElementQuery sq = new SpanElementQuery(
+				this.getField(), 
+				this.getElementStr()
+		);
+		sq.setBoost(this.getBoost());
+		return sq;
 	};
 	
     @Override
     public void extractTerms(Set<Term> terms) {
-    	terms.add(element);
+    	terms.add(new Term(getField(),"<>:"+elementStr));
     };
 
     @Override
@@ -71,24 +75,22 @@
     public int hashCode() {
     	final int prime = 37; // Instead of 31
     	int result = super.hashCode();
-    	result = prime * result + ((element == null) ? 0 : element.hashCode());
+    	result = prime * result + ((elementStr == null) ? 0 : elementStr.hashCode());
     	return result;
     };
 
     @Override
     public boolean equals(Object obj) {
-		if (this == obj)
-		    return true;
-		if (!super.equals(obj))
-		    return false;
-		if (getClass() != obj.getClass())
-		    return false;
+		if (this == obj) return true;
+		//if (!super.equals(obj)) return false;
+		if (getClass() != obj.getClass()) return false;
+		
 		SpanElementQuery other = (SpanElementQuery) obj;
-		if (element == null) {
-		    if (other.element != null)
+		if (elementStr == null && other.elementStr != null)
 			return false;
-		} else if (!element.equals(other.element))
+		else if (!elementStr.equals(other.elementStr))
 		    return false;
+		
 		return true;
     };
  
