diff --git a/src/fr/inrialpes/exmo/align/service/SQLCache.java b/src/fr/inrialpes/exmo/align/service/SQLCache.java
index f6e29ab272084f0fe28321e72048282bdc15ee1c..a60bb9919f3884b342d88dd2b0958b95ae99874c 100644
--- a/src/fr/inrialpes/exmo/align/service/SQLCache.java
+++ b/src/fr/inrialpes/exmo/align/service/SQLCache.java
@@ -633,6 +633,8 @@ public class SQLCache extends VolatilCache implements Cache {
 		    st = createStatement();
 		    logger.debug( "Storing network {} as {}", uri, id );
 		    conn.setAutoCommit( false );
+		    // Declare ontology network
+		    st.executeUpdate("INSERT INTO network (id) VALUES ("+qid+");");
 		    // Store alignments
 		    for ( Alignment align : network.getAlignments() ) {
 			String alid = align.getExtension( Namespace.ALIGNMENT.uri, Annotations.ID );
diff --git a/src/fr/inrialpes/exmo/align/service/VolatilCache.java b/src/fr/inrialpes/exmo/align/service/VolatilCache.java
index dd3ab00a00c06caedc18f41e6f5b110c58d443ea..26a5fd2dc90821fb89d8ecddf7a64fb3a4de8500 100644
--- a/src/fr/inrialpes/exmo/align/service/VolatilCache.java
+++ b/src/fr/inrialpes/exmo/align/service/VolatilCache.java
@@ -310,10 +310,14 @@ public class VolatilCache implements Cache {
      * retrieve network of ontologies from id
      */
     public OntologyNetwork getOntologyNetwork( String uri ) throws AlignmentException {
-	OntologyNetwork result = onetworkTable.get( uri );
-	if ( result == null )
-	    throw new AlignmentException("Cannot find ontology network "+uri);
-	return result;
+	try {
+	    OntologyNetwork result = onetworkTable.get( new URI( uri ) );
+	    if ( result == null )
+		throw new AlignmentException("Cannot find ontology network "+uri);
+	    return result;
+	} catch (URISyntaxException uriex) {
+	    throw new AlignmentException( "URI Syntax exception: "+uri, uriex );
+	}
     }
 	
     public void flushCache() { // throws AlignmentException