Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 20752)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 20765)
@@ -68,11 +68,14 @@
         if (wmsLayer.getName().equals(""))
             return false;
-        if (wmsLayer.getName().equals(lastWMSLayerName))
+        boolean isCookieExpired = isCookieExpired();
+        if (wmsLayer.getName().equals(lastWMSLayerName) && !isCookieExpired)
             return true;
         // open the session with the French Cadastre web front end
         downloadCancelled = false;
         try {
-            if (cookie == null || isCookieExpired())
+            if (cookie == null || isCookieExpired) {
                 getCookie();
+                interfaceRef = null;
+            }
             if (cookie == null)
                 throw new WMSException(tr("Cannot open a new client session.\nServer in maintenance or temporary overloaded."));
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 20752)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 20765)
@@ -188,8 +188,10 @@
             Main.map.mapView.repaint();
         }
-        if (buildingsOnly)
-            joinBufferedImages();
-        for (int i=lastSavedImage; i < images.size(); i++)
-            saveToCache(images.get(i));
+        if (!cancelled) {
+            if (buildingsOnly)
+                joinBufferedImages();
+            for (int i=lastSavedImage; i < images.size(); i++)
+                saveToCache(images.get(i));
+        }
     }
 
