diff --git a/model/sync-interest-table.cc b/model/sync-interest-table.cc
index 3a08fbd..703eded 100644
--- a/model/sync-interest-table.cc
+++ b/model/sync-interest-table.cc
@@ -32,7 +32,7 @@
 
 SyncInterestTable::SyncInterestTable ()
 {
-  m_scheduler.schedule (posix_time::seconds (m_checkPeriod),
+  m_scheduler.schedule (posix_time::seconds (4),
                         bind (&SyncInterestTable::expireInterests, this),
                         0);
 }
@@ -44,6 +44,7 @@
 vector<string>
 SyncInterestTable::fetchAll ()
 {
+  expireInterests ();
   recursive_mutex::scoped_lock lock (m_mutex);
   
   vector<string> entries;
@@ -100,9 +101,10 @@
   while (it != m_table.end())
     {
     time_t timestamp = it->second;
+    _LOG_DEBUG ("expireInterests (): " << timestamp << ", " << currentTime);
     if (currentTime - timestamp > m_checkPeriod)
       {
-        it = m_table.erase(it);
+        it = m_table.erase (it);
         count ++;
       }
     else
@@ -111,7 +113,7 @@
 
   _LOG_DEBUG ("expireInterests (): expired " << count);
   
-  m_scheduler.schedule (posix_time::seconds (m_checkPeriod),
+  m_scheduler.schedule (posix_time::seconds (4),
                         bind (&SyncInterestTable::expireInterests, this),
                         0);
 }
diff --git a/test/test_pit.cc b/test/test_pit.cc
index bb85580..512f429 100644
--- a/test/test_pit.cc
+++ b/test/test_pit.cc
@@ -28,41 +28,48 @@
 #include <boost/make_shared.hpp>
 
 #include "../model/sync-interest-table.h"
+#include "../model/sync-log.h"
 
 using namespace Sync;
 using namespace std;
 using namespace boost;
 
 string sitToString(SyncInterestTable *sit) {
-	vector<string> ent = sit->fetchAll();
-	sort(ent.begin(), ent.end());
-	string str = "";
-	while(!ent.empty()){
-		str += ent.back();
-		ent.pop_back();
-	}
-	return str;
+  vector<string> ent = sit->fetchAll();
+  sort(ent.begin(), ent.end());
+  string str = "";
+  while(!ent.empty()){
+    str += ent.back();
+    ent.pop_back();
+  }
+  return str;
 }
 
 BOOST_AUTO_TEST_CASE (SyncInterestTableTest)
 {
-	SyncInterestTable sit;
-	sit.insert("/ucla.edu/0");
-	sit.insert("/ucla.edu/1");
-	string str = sitToString(&sit);
-	BOOST_CHECK_EQUAL(str, "/ucla.edu/1/ucla.edu/0");
+  INIT_LOGGERS ();
+  INIT_LOGGER ("Test.Pit");
 
-	str = sitToString(&sit);
-	BOOST_CHECK_EQUAL(str, "");
+  SyncInterestTable sit;
+  sit.insert("/ucla.edu/0");
+  sit.insert("/ucla.edu/1");
+  string str = sitToString(&sit);
+  BOOST_CHECK_EQUAL(str, "/ucla.edu/1/ucla.edu/0");
 
-	sit.insert("/ucla.edu/0");
-	sit.insert("/ucla.edu/1");
-	sleep(2);
-	sit.insert("/ucla.edu/0");
-	sit.insert("/ucla.edu/2");
-	sleep(3);
-	str = sitToString(&sit);
-	BOOST_CHECK_EQUAL(str, "/ucla.edu/2/ucla.edu/0");
+  str = sitToString(&sit);
+  BOOST_CHECK_EQUAL(str, "");
+
+  _LOG_DEBUG ("Adding 0 and 1");
+  sit.insert("/ucla.edu/0");
+  sit.insert("/ucla.edu/1");
+  sleep(2);
+  _LOG_DEBUG ("Adding 0 and 2");
+  sit.insert("/ucla.edu/0");
+  sit.insert("/ucla.edu/2");
+  sleep(3);
+  _LOG_DEBUG ("Checking");
+  str = sitToString(&sit);
+  BOOST_CHECK_EQUAL(str, "/ucla.edu/2/ucla.edu/0");
 }
 
 
diff --git a/test/test_scheduler.cc b/test/test_scheduler.cc
index faf085b..62ed601 100644
--- a/test/test_scheduler.cc
+++ b/test/test_scheduler.cc
@@ -145,6 +145,7 @@
 {  
   SyncLogic *logic = 0;
   BOOST_CHECK_NO_THROW (logic = new SyncLogic ("/prefix", funcUpdate, funcRemove));
+  this_thread::sleep (posix_time::milliseconds (100));
 
   Scheduler &scheduler = logic->getScheduler ();
   BOOST_CHECK_EQUAL (scheduler.getEventsSize (), 1);
