diff --git a/demo/chatdialog.cpp b/demo/chatdialog.cpp
index e325d6b..4d7c358 100644
--- a/demo/chatdialog.cpp
+++ b/demo/chatdialog.cpp
@@ -92,7 +92,6 @@
     return;
   }
 
-  std::cout << "<<<< Received Message: " << msg.data() << std::endl;
   QTextCursor cursor(textEdit->textCursor());
   cursor.movePosition(QTextCursor::End);
   QTextTableFormat tableFormat;
@@ -103,18 +102,23 @@
   table->cellAt(0, 1).firstCursorPosition().insertText(msg.data().c_str());
   QScrollBar *bar = textEdit->verticalScrollBar();
   bar->setValue(bar->maximum());
-  std::cout << "<<<<, Message appended " << std::endl;
 }
 
 void
 ChatDialog::processTreeUpdateWrapper(const std::vector<Sync::MissingDataInfo> v, Sync::SyncAppSocket *sock)
 {
   emit treeUpdated(v);
+#ifdef __DEBUG
+  std::cout << "<<< Tree update signal emitted" << std::endl;
+#endif
 }
 
 void
 ChatDialog::processTreeUpdate(const std::vector<Sync::MissingDataInfo> v)
 {
+#ifdef __DEBUG
+  std::cout << "<<< processing Tree Update" << std::endl;
+#endif
   if (v.empty())
   {
     return;
@@ -136,6 +140,9 @@
       for (Sync::SeqNo seq = v[i].low; seq <= v[i].high; ++seq)
       {
         m_sock->fetchRaw(v[i].prefix, seq, bind(&ChatDialog::processDataWrapper, this, _1, _2, _3), 2);
+#ifdef __DEBUG
+        std::cout << "<<< Fetching " << v[i].prefix << "/" <<seq.getSession() <<"/" << seq.getSeq() << std::endl;
+#endif
       }
     }
   }
@@ -156,6 +163,9 @@
 ChatDialog::processDataWrapper(std::string name, const char *buf, size_t len)
 {
   emit dataReceived(name.c_str(), buf, len);
+#ifdef __DEBUG
+  std::cout <<"<<< " << name << " fetched" << std::endl;
+#endif
 }
 
 void
@@ -266,7 +276,7 @@
   m_sock->publishRaw(m_user.getPrefix().toStdString(), m_session, buf, size, 60);
 
   int nextSequence = m_sock->getNextSeq(m_user.getPrefix().toStdString(), m_session);
-  Sync::MissingDataInfo mdi = {m_user.getPrefix().toStdString(), Sync::SeqNo(0), Sync::SeqNo(nextSequence)};
+  Sync::MissingDataInfo mdi = {m_user.getPrefix().toStdString(), Sync::SeqNo(0), Sync::SeqNo(nextSequence - 1)};
   std::vector<Sync::MissingDataInfo> v;
   v.push_back(mdi);
   m_scene->processUpdate(v, m_sock->getRootDigest().c_str());
diff --git a/demo/digesttreescene.cpp b/demo/digesttreescene.cpp
index 35df071..4bf699e 100644
--- a/demo/digesttreescene.cpp
+++ b/demo/digesttreescene.cpp
@@ -25,13 +25,18 @@
   for (int i = 0; i < n; i++) 
   {
     Roster_iterator it = m_roster.find(v[i].prefix.c_str());
-    if (it == m_roster.end()) {
+    if (it == m_roster.end()) 
+    {
       rePlot = true; 
       DisplayUserPtr p(new DisplayUser());
       p->setPrefix(v[i].prefix.c_str());
       p->setSeq(v[i].high);
       m_roster.insert(p->getPrefix(), p);
     }
+    else 
+    {
+      it.value()->setSeq(v[i].high);
+    }
   }
 
   if (rePlot) 
@@ -77,7 +82,7 @@
 
     reDrawNode(p, Qt::red);
 
-    if (previouslyUpdatedUser != DisplayUserNullPtr) 
+    if (previouslyUpdatedUser != DisplayUserNullPtr && previouslyUpdatedUser != p) 
     {
       reDrawNode(previouslyUpdatedUser, Qt::darkBlue);
     }
diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index 31a161b..860f119 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -299,7 +299,15 @@
                 {
                   diffLog->update (info, seq);
                   //m_onUpdate (info->toString (), seq, oldSeq);
-                  MissingDataInfo mdi = {info->toString(), ++oldSeq, seq};
+                  if (!oldSeq.isValid())
+                  {
+                    oldSeq = SeqNo(seq.getSession(), 0);
+                  }
+                  else
+                  {
+                    ++oldSeq;
+                  }
+                  MissingDataInfo mdi = {info->toString(), oldSeq, seq};
                   v.push_back(mdi);
                 }
             }
diff --git a/test/test_app_socket.cc b/test/test_app_socket.cc
index 5e7ddc2..df3a3a8 100644
--- a/test/test_app_socket.cc
+++ b/test/test_app_socket.cc
@@ -85,6 +85,7 @@
 
     std::cout << "In fetchNumbers. size of v is:  " << n << std::endl;
     for (int i = 0; i < n; i++) {
+      std::cout << "In fetchNumbers. v[i].low is (" <<v[i].low.getSession() <<", " << v[i].low.getSeq() << ") v[i].high is ("<<v[i].high.getSession() <<", " <<v[i].high.getSeq()<<")" << std::endl;
       for(SeqNo s = v[i].low; s <= v[i].high; ++s) {
         PRINT
         socket->fetchRaw(v[i].prefix, s, bind(&TestSocketApp::setNum, this, _1, _2, _3));
