diff --git a/php/classes/VOTableMgr.php b/php/classes/VOTableMgr.php
index c822d43..ec60275 100644
--- a/php/classes/VOTableMgr.php
+++ b/php/classes/VOTableMgr.php
@@ -32,6 +32,7 @@ class VOTableMgr {
   {
 	$this->is_little_endian = array_values(unpack('L1L', pack('V', 1)))[0] == 1;
 
+	libxml_set_streams_context(stream_context_create([ 'http' => [ 'method' => 'GET', 'timeout' => '5' ]]));
 	// BRE - Add proxy host if exists
         $context = ProxyUtils::getStreamContextWithProxy();
         if (isset($context)) {
@@ -464,7 +465,6 @@ class VOTableMgr {
 		}
 		$data = Array();
 		$fields = $this->xp->query($this->queryFields());
-		$resource = $this->xp->query($this->queryResource());
 		$nb_columns = $fields->length;
 		$row = Array();
 		$n_value = 0; // index of current value
diff --git a/php/epntap.php b/php/epntap.php
index 7d72d97..34554b1 100644
--- a/php/epntap.php
+++ b/php/epntap.php
@@ -96,8 +96,9 @@ function getServices() {
 
 	$regNumber = 0;
     $r = [];
-    $lastErrorMessage = null;
-	for(; $regNumber<count($registriesURL) ; $regNumber++) {
+    $lastErrorMessage = '';
+	for(; $regNumber < count($registriesURL) ; $regNumber++) {
+		error_log('trying ' . $registriesURL[$regNumber] . '...');
 		$r = request($registriesURL[$regNumber], $query);
 		if($r['success']) {
 			// Add several other parameters and remove AMDA
@@ -115,12 +116,13 @@ function getServices() {
 			}
 			break;
 		} else {
-			$lastErrorMesage = 'Last tried registry (' . $registriesURL[$regNumber] . ') returned this error: ' . $r['msg'] . '.';
+			$lastErrorMesage = $registriesURL[$regNumber] . ' returned this error: ' . $r['msg'] . '.';
+			error_log($lastErrorMesage);
 		}
 	}
 	
 	if(!$r['success']) {
-		$r['msg'] = 'Can not access any of these registries: ' . implode(', ', $registriesURL) . ', last error message is ' . $lastErrorMessage;
+		$r['msg'] = 'Can not access registry: ' . $lastErrorMessage;
 	}
 	return $r;
 }
--
libgit2 0.21.2