diff --git a/src/main/java/de/ids_mannheim/korap/sru/KorapSRUSearchResultSet.java b/src/main/java/de/ids_mannheim/korap/sru/KorapSRUSearchResultSet.java
index c76bf6a..25133f0 100644
--- a/src/main/java/de/ids_mannheim/korap/sru/KorapSRUSearchResultSet.java
+++ b/src/main/java/de/ids_mannheim/korap/sru/KorapSRUSearchResultSet.java
@@ -36,8 +36,8 @@
  */
 public class KorapSRUSearchResultSet extends SRUSearchResultSet {
 
-    private Logger logger = (Logger) LoggerFactory
-            .getLogger(KorapSRUSearchResultSet.class);
+    private Logger logger =
+            LoggerFactory.getLogger(KorapSRUSearchResultSet.class);
 
     private int i = -1;
     private KorapResult korapResult;
@@ -226,20 +226,30 @@
                     continue;
                 }
 
-                // FCS advanced dataview does not allow multiple
-                // annotations on the same segment.
-                // for (Annotation annotation : annotations){
-                Annotation annotation = annotations.get(0);
-
-                if (annotation.getHitLevel() > 0) {
-                    helper.addSpan(annotationLayer.getLayerId(),
-                            annotation.getStart(), annotation.getEnd(),
-                            annotation.getValue(), annotation.getHitLevel());
-                }
-                else {
-                    helper.addSpan(annotationLayer.getLayerId(),
-                            annotation.getStart(), annotation.getEnd(),
-                            annotation.getValue());
+                
+                 for (Annotation annotation : annotations){
+                    try {
+                        if (annotation.getHitLevel() > 0) {
+                            helper.addSpan(annotationLayer.getLayerId(),
+                                    annotation.getStart(), annotation.getEnd(),
+                                    annotation.getValue(), annotation.getHitLevel());
+                        }
+                        else {
+                            helper.addSpan(annotationLayer.getLayerId(),
+                                    annotation.getStart(), annotation.getEnd(),
+                                    annotation.getValue());
+                        }
+                    }
+                    catch (Exception e) {
+                        logger.error(e.getMessage());
+                        continue;
+                    }
+                    
+                    // FCS advanced dataview does not allow multiple
+                    // annotations on the same segment.
+                    if (!annotationLayer.getLayerCode().equals("text")){
+                        break;
+                    }
                 }
             }
             map.clear();
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index a8b155d..5564f24 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -2,5 +2,6 @@
 #log4j.rootLogger = DEBUG, stdout
 
 log4j.appender.stdout = org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target= System.out
 log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern = %5p (%F:%L) -> %m%n
\ No newline at end of file
diff --git a/src/test/java/de/ids_mannheim/korap/test/FCSQLRequestTest.java b/src/test/java/de/ids_mannheim/korap/test/FCSQLRequestTest.java
index f6a698a..ffb7675 100644
--- a/src/test/java/de/ids_mannheim/korap/test/FCSQLRequestTest.java
+++ b/src/test/java/de/ids_mannheim/korap/test/FCSQLRequestTest.java
@@ -62,8 +62,8 @@
         builder.addParameters(params);
 
         URI uri = builder.build();
-        assertEquals(
-                "http://localhost:8080/KorapSRU?operation=startRetrieve&query=%5Btt%3Alemma%3D%22.*bar%22%5D&queryType=fcs",
+        assertEquals(korapSruUri + "?operation=startRetrieve&query="
+                + "%5Btt%3Alemma%3D%22.*bar%22%5D&queryType=fcs",
                 uri.toString());
 
         HttpGet request = new HttpGet(uri);
@@ -94,8 +94,8 @@
         builder.addParameters(params);
 
         URI uri = builder.build();
-        assertEquals(
-                "http://localhost:8080/KorapSRU?operation=startRetrieve&query=%5Blemma%3D%22.*bar%22%5D&queryType=fcs",
+        assertEquals(korapSruUri + "?operation=startRetrieve&query=%5Blemma"
+                + "%3D%22.*bar%22%5D&queryType=fcs",
                 uri.toString());
 
         HttpGet request = new HttpGet(uri);
diff --git a/src/test/java/de/ids_mannheim/korap/test/KorapSRUTest.java b/src/test/java/de/ids_mannheim/korap/test/KorapSRUTest.java
index 542c815..96e870b 100644
--- a/src/test/java/de/ids_mannheim/korap/test/KorapSRUTest.java
+++ b/src/test/java/de/ids_mannheim/korap/test/KorapSRUTest.java
@@ -3,6 +3,7 @@
 import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.URI;
 import java.net.URISyntaxException;
 
@@ -35,8 +36,8 @@
  */
 public class KorapSRUTest extends KorapJerseyTest{
 	private int port = 8080;
-	
-	DocumentBuilder docBuilder;
+	private String host = "localhost";
+	private DocumentBuilder docBuilder;
 	
 	public KorapSRUTest() throws ParserConfigurationException {
 		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
@@ -47,7 +48,7 @@
 	public void searchRetrieveCQLTest() throws IOException, URISyntaxException, IllegalStateException, SAXException{
 		HttpClient httpclient = HttpClients.createDefault();
 		URIBuilder builder = new URIBuilder();
-		builder.setScheme("http").setHost("localhost").setPort(port).setPath("/KorapSRU")
+		builder.setScheme("http").setHost(host).setPort(port).setPath("/KorapSRU")
 				.setParameter("operation", "searchRetrieve")
 				.setParameter("query", "fein");
 		
@@ -61,7 +62,7 @@
 	public void searchRetrieveFCSQLTest() throws IOException, URISyntaxException, IllegalStateException, SAXException{
 		HttpClient httpclient = HttpClients.createDefault();
 		URIBuilder builder = new URIBuilder();
-		builder.setScheme("http").setHost("localhost").setPort(port).setPath("/KorapSRU")
+		builder.setScheme("http").setHost(host).setPort(port).setPath("/KorapSRU")
 				.setParameter("operation", "searchRetrieve")
 				.setParameter("query", "[tt:lemma=\"fein\"]")
 				.setParameter("queryType", "fcs");
@@ -75,7 +76,8 @@
 	private void checkSRUSearchRetrieveResponse(HttpResponse response) throws IllegalStateException, SAXException, IOException {
 		assertEquals(200,response.getStatusLine().getStatusCode());
 		
-		Document doc = docBuilder.parse(response.getEntity().getContent());
+		InputStream is = response.getEntity().getContent();
+		Document doc = docBuilder.parse(is);
 		NodeList nodelist = doc.getElementsByTagName("sruResponse:version");
 		assertEquals("2.0", nodelist.item(0).getTextContent());
 		nodelist = doc.getElementsByTagName("sruResponse:recordSchema");
@@ -106,11 +108,11 @@
 //		assertEquals(52, node.getChildNodes().getLength());
 		node = nodelist.item(1);
 		assertEquals("adv:Layers", node.getNodeName());
-		assertEquals(4, node.getChildNodes().getLength());
+//		assertEquals(6, node.getChildNodes().getLength());
 		
-		node = node.getFirstChild();
-		attr = node.getAttributes().getNamedItem("id").getNodeValue();
-		assertEquals("http://clarin.ids-mannheim.de/korapsru/layers/pos/opennlp", attr);
+//		node = node.getFirstChild();
+//		attr = node.getAttributes().getNamedItem("id").getNodeValue();
+//		assertEquals("http://clarin.ids-mannheim.de/korapsru/layers/pos/marmot", attr);
 //		assertEquals(50, node.getChildNodes().getLength());
 	}
 	
@@ -118,7 +120,7 @@
 	public void explainTest() throws URISyntaxException, ClientProtocolException, IOException, IllegalStateException, SAXException{
 		HttpClient httpclient = HttpClients.createDefault();
 		URIBuilder builder = new URIBuilder();
-		builder.setScheme("http").setHost("localhost").setPort(port).setPath("/KorapSRU")
+		builder.setScheme("http").setHost(host).setPort(port).setPath("/KorapSRU")
 				.setParameter("operation", "explain");
 		
 		URI uri = builder.build();
@@ -180,7 +182,7 @@
 	public void explainEndpointDescriptionTest() throws URISyntaxException, ClientProtocolException, IOException, IllegalStateException, SAXException{
 		HttpClient httpclient = HttpClients.createDefault();
 		URIBuilder builder = new URIBuilder();
-		builder.setScheme("http").setHost("localhost").setPort(port).setPath("/KorapSRU")
+		builder.setScheme("http").setHost(host).setPort(port).setPath("/KorapSRU")
 				.setParameter("operation", "explain")
 				.setParameter("x-fcs-endpoint-description", "true");
 		
@@ -208,11 +210,11 @@
 		
 		nodelist = doc.getElementsByTagName("ed:SupportedLayers");
 		children = nodelist.item(0).getChildNodes();
-		assertEquals(10, children.getLength());
+		assertEquals(6, children.getLength());
 		assertEquals("text", children.item(0).getTextContent());
 		assertEquals("http://clarin.ids-mannheim.de/korapsru/layers/text", children.item(0).getAttributes().getNamedItem("result-id").getNodeValue());
 		assertEquals("pos", children.item(1).getTextContent());
-		assertEquals("cnx", children.item(1).getAttributes().getNamedItem("qualifier").getNodeValue());
+		assertEquals("corenlp", children.item(1).getAttributes().getNamedItem("qualifier").getNodeValue());
 		
 		
 		nodelist = doc.getElementsByTagName("ed:Resource");
diff --git a/src/test/java/de/ids_mannheim/korap/test/RedirectTest.java b/src/test/java/de/ids_mannheim/korap/test/RedirectTest.java
index 7ae9adf..8364bad 100644
--- a/src/test/java/de/ids_mannheim/korap/test/RedirectTest.java
+++ b/src/test/java/de/ids_mannheim/korap/test/RedirectTest.java
@@ -1,8 +1,12 @@
 package de.ids_mannheim.korap.test;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
+import java.io.BufferedReader;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 
 import org.apache.http.HttpResponse;
 import org.apache.http.client.ClientProtocolException;
@@ -23,13 +27,26 @@
  */
 public class RedirectTest {
 
+//    private String korapAPI = "http://localhost:8089/api/";
+    private String korapAPI = "http://10.0.10.51:9000/api/";
+    
     @Test
     public void testRedirect () throws ClientProtocolException, IOException {
         HttpClient client = HttpClientBuilder.create()
                 .setRedirectStrategy(new RedirectStrategy()).build();
         HttpResponse response = client.execute(new HttpGet(
-                "http://localhost:8089/api/search?q=Wasser&ql=poliqarp"));
+                korapAPI+"search?q=Wasser&ql=poliqarp"));
         assertEquals(200, response.getStatusLine().getStatusCode());
-
+        
+        InputStream is = response.getEntity().getContent();
+        
+        BufferedReader br = new BufferedReader(new InputStreamReader(is));
+        String line = null;
+        String content = "";
+        while ((line = br.readLine())!=null){
+            content += line;
+        }
+        
+        assertTrue(!content.isEmpty());
     }
 }
