diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index b44c2e8..7a3eae6 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -299,10 +299,7 @@
                 {
                   diffLog->update (info, seq);
                   //m_onUpdate (info->toString (), seq, oldSeq);
-                  MissingDataInfo mdi;
-                  mdi.prefix = info->toString();
-                  mdi.low = oldSeq;
-                  mdi.high = seq;
+                  MissingDataInfo mdi = {info->toString(), ++oldSeq, seq};
                   v.push_back(mdi);
                 }
             }
diff --git a/model/sync-seq-no.h b/model/sync-seq-no.h
index 4f84482..7814f91 100644
--- a/model/sync-seq-no.h
+++ b/model/sync-seq-no.h
@@ -124,20 +124,18 @@
   bool
   operator <= (const SeqNo &seq) const
   {
-    return m_session <= seq.m_session || (m_session == seq.m_session && m_seq <= seq.m_seq);
+    return m_session == seq.m_session && m_seq <= seq.m_seq;
   }
 
   SeqNo &
   operator ++ ()
   {
-    m_seq ++;
-    return *this;
-  }
-
-  SeqNo &
-  operator --()
-  {
-    m_seq --;
+    if (m_valid) {
+      m_seq ++;
+    }
+    else {
+      m_valid = true;
+    }
     return *this;
   }
 
diff --git a/test/test_app_socket.cc b/test/test_app_socket.cc
index 6a6e04a..d502822 100644
--- a/test/test_app_socket.cc
+++ b/test/test_app_socket.cc
@@ -40,6 +40,9 @@
 
 INIT_LOGGER ("Test.AppSocket");
 
+#define PRINT 
+//std::cout << "Line: " << __LINE__ << std::endl;
+
 class TestSocketApp {
 public:
   map<string, string> data;
@@ -51,9 +54,12 @@
 
   void fetchAll(const vector<MissingDataInfo> &v, SyncAppSocket *socket) {
     int n = v.size();
+
+    PRINT
+
     for (int i = 0; i < n; i++) {
-      SeqNo s = v[i].low;
-      for(++s; s <= v[i].high; ++s) {
+      for(SeqNo s = v[i].low; s <= v[i].high; ++s) {
+        PRINT
         socket->fetchString(v[i].prefix, s, bind(&TestSocketApp::set, this, _1, _2));
       }
     }
@@ -101,7 +107,7 @@
   string data0 = "Very funny Scotty, now beam down my clothes";
   _LOG_DEBUG ("s1 publish");
   s1.publishString (p1, 0, data0, 10); 
-  this_thread::sleep (posix_time::milliseconds (120));
+  this_thread::sleep (posix_time::milliseconds (1000));
 
   // from code logic, we won't be fetching our own data
   a1.set(p1 + "/0/0", data0);
diff --git a/test/test_ccnx_wrapper.cc b/test/test_ccnx_wrapper.cc
index 3db44ba..c10930c 100644
--- a/test/test_ccnx_wrapper.cc
+++ b/test/test_ccnx_wrapper.cc
@@ -44,6 +44,15 @@
     s_str1 = str1;
     s_str2 = str2;
   }
+  char *m_buf;
+  size_t m_len;
+
+  void rawSet(string str1, const char *buf, size_t len) {
+    std::cout << "In rawSet" << std::endl;
+    m_buf = (char  *)calloc(1, len);
+    memcpy(m_buf, buf, len);
+    s_str1 = str1;
+  }
 };
 
 BOOST_AUTO_TEST_CASE (CcnxWrapperTest)
@@ -57,6 +66,9 @@
   boost::function<void (string, string)> memberFunc =
     bind(&TestStruct::set, &foo, _1, _2);
 
+  boost::function<void (string, const char *, size_t)> rawFunc =
+    bind(&TestStruct::rawSet, &foo, _1, _2, _3);
+
   string prefix = "/ucla.edu";
   ha.setInterestFilter(prefix, globalFunc);
   this_thread::sleep (posix_time::milliseconds (10));
@@ -79,6 +91,14 @@
   this_thread::sleep (posix_time::milliseconds (5));
   BOOST_CHECK_EQUAL(foo.s_str1, name);
   BOOST_CHECK_EQUAL(foo.s_str2, data);
+
+  string rawDataName = "/ucla.edu/1";
+  int num[5] = {0, 1, 2, 3, 4};
+  ha.publishRawData(rawDataName, (const char *)num, sizeof(num), 30);
+  hb.sendInterest(rawDataName, rawFunc);
+  BOOST_CHECK_EQUAL(foo.s_str1, rawDataName);
+  
+  BOOST_CHECK(memcmp((char *)num, foo.m_buf, foo.m_len) == 0);
 }
 
 
diff --git a/test/test_scheduler.cc b/test/test_scheduler.cc
index 59687e4..0d67417 100644
--- a/test/test_scheduler.cc
+++ b/test/test_scheduler.cc
@@ -137,6 +137,10 @@
 {
 }
 
+void funcPass( const std::vector<MissingDataInfo> &v)
+{
+}
+
 void funcRemove( const std::string &/*prefix*/ )
 {
 }
@@ -144,7 +148,7 @@
 BOOST_AUTO_TEST_CASE (SyncLogicSchedulerTest)
 {  
   SyncLogic *logic = 0;
-  BOOST_CHECK_NO_THROW (logic = new SyncLogic ("/prefix", funcUpdate, funcRemove));
+  BOOST_CHECK_NO_THROW (logic = new SyncLogic ("/prefix", funcPass, funcRemove));
   this_thread::sleep (posix_time::milliseconds (100));
 
   Scheduler &scheduler = logic->getScheduler ();
