diff --git a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/Exporter.java b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/Exporter.java
index 64cc843..8ed9007 100644
--- a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/Exporter.java
+++ b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/Exporter.java
@@ -16,6 +16,8 @@
     public JsonNode getQuery();
     public JsonNode getCollection();
     public void appendMatches (String s) throws IOException;
+    public String getFname ();
+    public void setFname (String s);
 
     // Implemented by Exporter
     public ResponseBuilder serve();
diff --git a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
index 004de3f..3add327 100644
--- a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
+++ b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
@@ -201,11 +201,6 @@
                 );
         }
 
-        // set filename based on query (if not already set)
-        if (fname == null) {
-            fname = q;
-        };
-
         Exporter exp;
 
         // Choose the correct exporter
@@ -216,6 +211,14 @@
             exp = new RtfExporter();
         };
 
+        // set filename based on query (if not already set)
+        if (fname != null) {
+            exp.setFname(fname);
+        }
+        else {
+            exp.setFname(q);
+        };
+        
         // Initialize exporter (with meta data and first matches)
         exp.init(resp);
         
@@ -263,13 +266,6 @@
             builder = exp.serve();
         };        
 
-        builder.header(
-            "Content-Disposition",
-            "attachment; filename=" +
-            sanitizeFileName(fname) +
-            '.' +
-            exp.getSuffix()
-            );
         return builder.build();
     };
 
diff --git a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/MatchAggregator.java b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/MatchAggregator.java
index 944b729..6767680 100644
--- a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/MatchAggregator.java
+++ b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/MatchAggregator.java
@@ -22,6 +22,8 @@
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.ResponseBuilder;
 
+import static de.ids_mannheim.korap.plkexport.Util.*;
+
 /**
  * Base class for collecting matches and header information
  * for exporters implementing the Exporter interface.
@@ -38,6 +40,7 @@
     private File file;
     
     public JsonNode meta, query, collection;
+    private String fname;
 
     public String getMimeType() {
         return "text/plain";
@@ -47,6 +50,16 @@
         return "txt";
     };
 
+    public void setFname (String fname) {
+        this.fname = fname;
+    };
+
+    public String getFname () {
+        if (this.fname == null)
+            return "unknown";
+        return sanitizeFileName(this.fname);
+    };
+
     public void setMeta (JsonNode meta) {
         this.meta = meta;
     };
@@ -177,7 +190,15 @@
                 rb = Response.ok(this.file);
             };
 
-            return rb.type(this.getMimeType());
+            return rb
+                .type(this.getMimeType())
+                .header(
+                    "Content-Disposition",
+                    "attachment; filename=" +
+                    this.getFname() +
+                    '.' +
+                    this.getSuffix()
+                    );
         }
 
         // Catch error
diff --git a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/JsonExportTest.java b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/JsonExportTest.java
index 8ab7acb..3784f2f 100644
--- a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/JsonExportTest.java
+++ b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/JsonExportTest.java
@@ -51,7 +51,17 @@
         resp.close();
         assertEquals(slurp(x),"{\"query\":\"cool\",\"meta\":\"ja\",\"collection\":\"hm\",\"matches\":[\"first\",\"second\",\"third\",\"fourth\"]}");
     };
+
+    @Test
+    public void testAttributes () throws IOException {
+        JsonExporter json = new JsonExporter();
+        json.setFname("Beispiel");
+        assertEquals(json.getFname(),"Beispiel");
+        assertEquals(json.getMimeType(),"application/json");
+        assertEquals(json.getSuffix(),"json");
+    };
     
+
     public static String slurp (File file) throws IOException {
         BufferedReader br = new BufferedReader(new FileReader(file)); 	  
         String string; 
diff --git a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/MatchAggregatorTest.java b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/MatchAggregatorTest.java
index 80fe776..af21fd9 100644
--- a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/MatchAggregatorTest.java
+++ b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/MatchAggregatorTest.java
@@ -45,4 +45,15 @@
         assertNull(m.query);
         assertNull(m.collection);
     };
+
+    @Test
+    public void testAttributes () throws IOException {
+        MatchAggregator m = new MatchAggregator();
+        m.setFname("Beispiel");
+        assertEquals(m.getFname(),"Beispiel");
+        m.setFname("contains(<s name=\"okay\">,[orth='Test'])");
+        assertEquals(m.getFname(),"contains(s-name-okay-orth-Test)");
+        assertEquals(m.getMimeType(),"text/plain");
+        assertEquals(m.getSuffix(),"txt");
+    };
 };
diff --git a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/RtfExportTest.java b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/RtfExportTest.java
index 956a33f..6192b5a 100644
--- a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/RtfExportTest.java
+++ b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/RtfExportTest.java
@@ -17,10 +17,10 @@
 
     @Test
     public void testInit () throws IOException {
-        RtfExporter json = new RtfExporter();
-        json.init("{\"query\":\"cool\"}");
+        RtfExporter rtf = new RtfExporter();
+        rtf.init("{\"query\":\"cool\"}");
 
-        Response resp = json.serve().build();
+        Response resp = rtf.serve().build();
         String x = (String) resp.getEntity();
         resp.close();
         assertTrue(x.contains("{\\pard\\ql @ Institut"));
@@ -29,8 +29,8 @@
 
     @Test
     public void testInitFull () throws IOException {
-        RtfExporter json = new RtfExporter();
-        json.init("{\"meta\":\"ja\",\"collection\":\"hm\",\"query\":\"cool\"," +
+        RtfExporter rtf = new RtfExporter();
+        rtf.init("{\"meta\":\"ja\",\"collection\":\"hm\",\"query\":\"cool\"," +
                   "\"matches\":["+
                   "{\"author\":\"Goethe\","+
                   "\"title\":\"Title1\","+
@@ -47,7 +47,7 @@
                   "<span class=\\\"more\\\"></span></span>\"}"+
                   "]}");
 
-        Response resp = json.serve().build();
+        Response resp = rtf.serve().build();
         String x = (String) resp.getEntity();
         resp.close();
         assertTrue(x.contains("{\\b match1}"));
@@ -60,4 +60,13 @@
         assertTrue(x.contains("Snippet\\par}"));
         assertTrue(x.contains("Snippet [...]\\par}"));
     };
+
+    @Test
+    public void testAttributes () throws IOException {
+        RtfExporter rtf = new RtfExporter();
+        rtf.setFname("Beispiel");
+        assertEquals(rtf.getFname(),"Beispiel");
+        assertEquals(rtf.getMimeType(),"application/rtf");
+        assertEquals(rtf.getSuffix(),"rtf");
+    };
 };
