Index: trunk/FACT++/src/drivectrl.cc
===================================================================
--- trunk/FACT++/src/drivectrl.cc	(revision 13165)
+++ trunk/FACT++/src/drivectrl.cc	(revision 13166)
@@ -879,5 +879,5 @@
     int Track(const EventImp &evt)
     {
-        if (evt.GetSize()<=17)
+        if (evt.GetSize()<=16)
         {
             ostringstream msg;
@@ -887,13 +887,22 @@
         }
 
-        if (evt.Get<char>(evt.GetSize()-1)!='\0')
-            T::Warn("Track - It seems that the string is not zero-terminated.");
-
-        const double *dat = evt.Ptr<double>();
-        const string name = evt.Ptr<char>(16);
+        const double *dat  = evt.Ptr<double>();
+        const char   *ptr  = evt.Ptr<char>(16);
+        const char   *last = ptr+evt.GetSize()-16;
+
+        if (find(ptr, last, '\0')==last)
+        {
+            T::Fatal("Track - The name transmitted by dim is not null-terminated.");
+            return false;
+        }
+
+        const string name(ptr);
 
         const sources::const_iterator it = fSources.find(name);
         if (it==fSources.end())
-            return T::Error("Source '"+name+"' not found in list.");
+        {
+            T::Error("Source '"+name+"' not found in list.");
+            return false;
+        }
 
         const double &ra  = it->second.first;
@@ -1208,6 +1217,4 @@
     int EvalOptions(Configuration &conf)
     {
-        SetEndpoint(conf.Get<string>("addr"));
-
         fDrive.SetVerbose(!conf.Get<bool>("quiet"));
 
@@ -1249,4 +1256,8 @@
         if (conf.Has("source-database"))
             ReadDatabase(conf.Get<string>("source-database"));
+
+        // The possibility to connect should be last, so that
+        // everything else is already initialized.
+        SetEndpoint(conf.Get<string>("addr"));
 
         return -1;
