diff --git a/pom.xml b/pom.xml
index 9a0ed8b..a9b7ae7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,10 +69,15 @@
 		</dependency>
 		<dependency>
 			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-simple</artifactId>
-			<version>1.7.26</version>
+			<artifactId>slf4j-api</artifactId>
+			<version>1.7.29</version>
 		</dependency>
 		<dependency>
+	        <groupId>org.slf4j</groupId>
+	        <artifactId>slf4j-jdk14</artifactId>
+	        <version>1.7.29</version>
+	    </dependency>
+		<dependency>
 			<groupId>org.apache.directory.studio</groupId>
 			<artifactId>org.apache.commons.lang</artifactId>
 			<version>2.6</version>
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());
     }
 }
