diff --git a/src/fr/inrialpes/exmo/align/service/SQLCache.java b/src/fr/inrialpes/exmo/align/service/SQLCache.java
index 4379a3839165f2b244db24da4255cd1965188de6..9e9c463935be4daaac7813c31c5c0d51d7c3f6be 100644
--- a/src/fr/inrialpes/exmo/align/service/SQLCache.java
+++ b/src/fr/inrialpes/exmo/align/service/SQLCache.java
@@ -609,7 +609,7 @@ public class SQLCache extends VolatilCache implements Cache {
 	} else {
 		String sformname = "";
 		if ( res.getString("formname") != null ) sformname = res.getString("formname");
-	    if ( onto != null && res.getString("formname").equals("") ) { // JE: checktest
+		if ( onto != null && sformname.equals("") ) { // JE: checktest
 		logger.debug( "Updating ontology {} with formalism {}", suri, onto.getFormalism() );
     	if ( onto.getFormURI() != null ) sformuri = onto.getFormURI().toString();	
 		query = "UPDATE ontology SET formname="+quote(onto.getFormalism())+", formuri="+quote(sformuri)+" WHERE uri="+quote(suri)+";";