diff --git a/annis-gui/src/main/java/annis/gui/MetaDataPanel.java b/annis-gui/src/main/java/annis/gui/MetaDataPanel.java
index <HASH>..<HASH> 100644
--- a/annis-gui/src/main/java/annis/gui/MetaDataPanel.java
+++ b/annis-gui/src/main/java/annis/gui/MetaDataPanel.java
@@ -62,10 +62,6 @@ public class MetaDataPanel extends Panel
     setContent(layout);
     layout.setSizeFull();
 
-    // load meta data from service
-    BeanItemContainer<Annotation> mData =
-      new BeanItemContainer<Annotation>(Annotation.class);
-
     // are we called from the corpusBrowser or there is no subcorpus stay here:
     if (documentName == null)
     {
@@ -172,8 +168,17 @@ public class MetaDataPanel extends Panel
   private Map<Integer, List<Annotation>> splitListAnnotations()
   {
     List<Annotation> metadata = getMetaData(toplevelCorpusName, documentName);
-    Map<Integer, List<Annotation>> hashMetaData =
-      new TreeMap<Integer, List<Annotation>>(Collections.reverseOrder());
+
+    Map<Integer, List<Annotation>> hashMetaData;
+    if (documentName != null)
+    {
+      hashMetaData =
+        new TreeMap<Integer, List<Annotation>>(Collections.reverseOrder());
+    }
+    else
+    {
+      hashMetaData = new TreeMap<Integer, List<Annotation>>();
+    }
 
     for (Annotation metaDatum : metadata)
     {
Put the document annotations into the right order.