Index: TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java
===================================================================
--- TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java	(revision 3703)
+++ TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java	(revision 3704)
@@ -1335,9 +1335,9 @@
 	 *            the name
 	 * @return the subcorpus by name
 	 */
-	public CQPCorpus getSubcorpusByName(String name) {
+	public Subcorpus getSubcorpusByName(String name) {
 		List<Subcorpus> subcorpora = getSubcorpora();
-		for (CQPCorpus corpus : subcorpora) {
+		for (Subcorpus corpus : subcorpora) {
 			if (corpus.getName().equals(name)) {
 				return corpus;
 			}
Index: TXM/trunk/bundles/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java
===================================================================
--- TXM/trunk/bundles/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java	(revision 3703)
+++ TXM/trunk/bundles/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java	(revision 3704)
@@ -331,6 +331,7 @@
 		
 		sentCounterLabel = new Label(navigationAreaComposite, SWT.NONE);
 		gdata = new GridData(SWT.FILL, SWT.CENTER, false, false);
+		gdata.minimumWidth = 100;
 		sentCounterLabel.setLayoutData(gdata);
 		
 		new Label(navigationAreaComposite, SWT.NONE);
@@ -487,7 +488,9 @@
 		// return;
 		// }
 		
+		sentCounterLabel.getParent().layout();
 		getMainParametersComposite().getParent().layout();
+		
 	}
 	
 	/**
Index: TXM/trunk/bundles/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/preferences/CQPPreferencePage.java
===================================================================
--- TXM/trunk/bundles/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/preferences/CQPPreferencePage.java	(revision 3703)
+++ TXM/trunk/bundles/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/preferences/CQPPreferencePage.java	(revision 3704)
@@ -200,18 +200,17 @@
 		boolean useNetwork = false;
 		boolean serverIsRemote = false;
 		boolean update = false;
-		if (((FieldEditor) event.getSource()).getPreferenceName().equals(
-				CQPLibPreferences.CQI_SERVER_IS_REMOTE)) {
+		if (((FieldEditor) event.getSource()).getPreferenceName().equals(CQPLibPreferences.CQI_SERVER_IS_REMOTE)) {
 			useNetwork = cqi_use_network.getBooleanValue();
 			serverIsRemote = (Boolean) event.getNewValue();
 			update = true;
-		} else if (((FieldEditor) event.getSource()).getPreferenceName().equals(
-				CQPLibPreferences.CQI_NETWORK_MODE)) {
+		} else if (((FieldEditor) event.getSource()).getPreferenceName().equals(CQPLibPreferences.CQI_NETWORK_MODE)) {
 			useNetwork = (Boolean) event.getNewValue();
 			serverIsRemote = cqi_server_is_remote.getBooleanValue();
 			update = true;
 		}
-		if (update)
+		if (update) {
 			updateFieldsState(useNetwork, serverIsRemote);
+		}
 	}
 }
\ No newline at end of file
Index: TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/CoNLLUCorpusPreferences.java
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/CoNLLUCorpusPreferences.java	(revision 3703)
+++ TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/CoNLLUCorpusPreferences.java	(revision 3704)
@@ -75,7 +75,10 @@
 		InputDialog dialog = new InputDialog(HandlerUtil.getActiveShell(event), "CoNLL-U Corpus preferences", "Prefix of the CQP properties encoding the UD fields", udPrefix, null);
 		
 		if (dialog.open() == InputDialog.OK) {
-			
+			if (dialog.getValue().length() == 0) {
+				Log.warning("UD prefix cannot be empty");
+				return null;
+			}
 			customNode.put(UDPreferences.UDPREFIX, dialog.getValue());
 			Log.info("Set "+c.getName()+" prefix to "+dialog.getValue());
 			return s;
Index: TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/preferences/CoNLLUPreferencePage.java
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/preferences/CoNLLUPreferencePage.java	(revision 3703)
+++ TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/preferences/CoNLLUPreferencePage.java	(revision 3704)
@@ -2,11 +2,13 @@
 
 import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.ui.IWorkbench;
 import org.txm.conllu.core.preferences.UDPreferences;
 import org.txm.rcp.IImageKeys;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
+import org.txm.utils.logger.Log;
 
 /**
  * UD preferences page
@@ -16,6 +18,8 @@
  */
 public class CoNLLUPreferencePage extends TXMPreferencePage {
 
+	private StringFieldEditor udPrefixField;
+
 	@Override
 	public void createFieldEditors() {
 		
@@ -23,11 +27,25 @@
 		this.addField(new BooleanFieldEditor(UDPreferences.IMPORT_BUILD_TIGERSEARCH_INDEXES, "Build TIGERSearch indexes as well", this.getFieldEditorParent()));
 		
 		this.addField(new BooleanFieldEditor(UDPreferences.KEEP_CONTRACTIONS, "Keep word contractions when importing CoNLL-U files", this.getFieldEditorParent()));
-		this.addField(new StringFieldEditor(UDPreferences.UDPREFIX, "UD properties prefix", this.getFieldEditorParent()));
+		udPrefixField = new StringFieldEditor(UDPreferences.UDPREFIX, "UD properties prefix", this.getFieldEditorParent());
+		this.addField(udPrefixField);
 		this.addField(new StringFieldEditor(UDPreferences.IMPORT_HEAD_TO_PROJECT, "UD head properties to project (comma separated list)", this.getFieldEditorParent()));
 		this.addField(new StringFieldEditor(UDPreferences.IMPORT_DEPS_TO_PROJECT, "UD deps properties to project (comma separated list)", this.getFieldEditorParent()));
 	}
 	
+	@Override
+	public void propertyChange(PropertyChangeEvent event) {
+		if (udPrefixField.getStringValue().length() == 0) {
+			setErrorMessage("UD prefix cannot be empty");
+		}
+	}
+	
+	@Override
+	public boolean performOk() {
+		
+		return super.performOk();
+	}
+	
 	/*
 	 * (non-Javadoc)
 	 * 
Index: TXM/trunk/bundles/org.txm.conllu.core/src/org/txm/conllu/core/function/UDSearch.java
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.core/src/org/txm/conllu/core/function/UDSearch.java	(revision 3703)
+++ TXM/trunk/bundles/org.txm.conllu.core/src/org/txm/conllu/core/function/UDSearch.java	(revision 3704)
@@ -18,6 +18,7 @@
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.QueryResult;
 import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
 import org.txm.searchengine.cqp.corpus.WordProperty;
 import org.txm.searchengine.cqp.corpus.query.CQLQuery;
 import org.txm.searchengine.cqp.corpus.query.Match;
@@ -30,7 +31,7 @@
 	
 	protected boolean ready = false;
 	
-	CQPCorpus udSentences;
+	Subcorpus udSentences;
 
 	private QueryResult matches;
 	
@@ -313,11 +314,16 @@
 		udSentences = corpus.getSubcorpusByName(corpus.getName()+"/ud-sentences");
 		if (udSentences != null) udSentences.compute();
 		
+		CQLQuery sentencesQuery = new CQLQuery("["+prefix+"id=\"1\"] ["+prefix+"id !=\"1\"]+ [:"+prefix+"id=\"1|__UNDEF__\":]");
 		if (udSentences == null) {
-			udSentences = corpus.createSubcorpus(new CQLQuery("["+prefix+"id=\"1\"] ["+prefix+"id !=\"1\"]+ [:"+prefix+"id=\"1|__UNDEF__\":]"), "ud-sentences");
+			udSentences = corpus.createSubcorpus(sentencesQuery, "ud-sentences");
 			udSentences.setVisible(false);
 		}
-		
+		if (!udSentences.getQuery().equals(sentencesQuery)) {
+			udSentences = corpus.createSubcorpus(sentencesQuery, "ud-sentences");
+			udSentences.setVisible(false);
+		}
+
 		matches = udSentences.query((CQLQuery)pQuery, "matches", false);
 		
 		return matches.getNMatch() > 0;
