Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/export/URSAnnotationTEIExporter.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/export/URSAnnotationTEIExporter.java	(revision 2091)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/export/URSAnnotationTEIExporter.java	(revision 2092)
@@ -423,13 +423,19 @@
 				@Override
 				public int compare(Schema s1, Schema s2) {
 					Unite u1 = s1.getUnite0();
+					Unite u2 = s2.getUnite0();
+					
+					if (u1 == null && u2 == null) return 0;
 					if (u1 == null) return -1;
-					Unite u2 = s2.getUnite0();
 					if (u2 == null) return 1;
+					
 					if (u1.getDeb() < u2.getDeb()) return -1;
 					if (u1.getDeb() > u2.getDeb()) return 1;
+					
+					// u1.deb == u2.deb
 					if (u1.getFin() < u2.getFin()) return -1;
 					if (u1.getFin() > u2.getFin()) return 1;
+					
 					return 0;
 				}
 			});
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInDirectoryMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInDirectoryMacro.groovy	(revision 2091)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInDirectoryMacro.groovy	(revision 2092)
@@ -56,6 +56,8 @@
 
 if (!ParametersDialog.open(this)) return;
 
+replaceWith = org.apache.commons.lang.StringEscapeUtils.unescapeJava(replaceWith)
+
 println "Working with $inputDirectory files with extension="+/.*$extension/
 if (showMatchingFilesOnly) {
 	println "Search '$find'"
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInFileMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInFileMacro.groovy	(revision 2091)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInFileMacro.groovy	(revision 2092)
@@ -51,6 +51,8 @@
 
 if (!ParametersDialog.open(this)) return;
 
+replaceWith = org.apache.commons.lang.StringEscapeUtils.unescapeJava(replaceWith)
+
 println "SearchAndReplace in $file"
 
 	def tmp = File.createTempFile("SearchReplaceInDirectoryTemp", ".tmp", file.getParentFile()) // create temporary file
Index: tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java
===================================================================
--- tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java	(revision 2091)
+++ tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java	(revision 2092)
@@ -11,7 +11,6 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.txm.Toolbox;
-import org.txm.core.preferences.TBXPreferences;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.utils.ConsoleProgressBar;
 import org.txm.utils.io.IOUtils;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 2091)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 2092)
@@ -530,11 +530,13 @@
 
 				installPreferenceRestored = false; // reset and finally set true if the process ended correctly
 
+				try {
 				Display.getDefault().syncExec(new Runnable() {
 					@Override
 					public void run() { OpenWelcomePage.openWelcomePage(); }
 				});
-
+				} catch(Exception e2) {}
+				
 				// set the install directory preference
 				String installpath = Platform.getInstallLocation().getURL().getFile(); // the TXM.exe file path
 				File installDirectory = new File(installpath);
@@ -585,11 +587,10 @@
 
 				TBXPreferences.getInstance().put(TBXPreferences.INSTALL_DIR, installDirectory.getAbsolutePath());
 				TBXPreferences.getInstance().flush();
-				TXMPreferences.saveAll();
 				return true;
 			}
 		} catch (Exception e) {
-			System.err.println(TXMCoreMessages.bind(TXMUIMessages.couldNotReadInstallPreferencesFile, e.getLocalizedMessage()));
+			Log.severe(TXMCoreMessages.bind(TXMUIMessages.couldNotReadInstallPreferencesFile, e));
 			Log.printStackTrace(e);
 			return false;
 		}
