diff --git a/src/contact-storage.cpp b/src/contact-storage.cpp
index 903f210..b3ee977 100644
--- a/src/contact-storage.cpp
+++ b/src/contact-storage.cpp
@@ -288,7 +288,6 @@
 Ptr<Profile>
 ContactStorage::getSelfProfile(const Name& identity)
 {
-  _LOG_DEBUG("getSelfProfile " << identity.toUri());
   sqlite3_stmt *stmt;
   Ptr<Profile> profile = Ptr<Profile>(new Profile(identity));
   
@@ -297,13 +296,14 @@
 
   while(sqlite3_step (stmt) == SQLITE_ROW)
     {
-      _LOG_DEBUG("entry");
       string profileType(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 0)), sqlite3_column_bytes (stmt, 0));
       Blob profileValue(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 1)), sqlite3_column_bytes (stmt, 1));
 
       profile->setProfileEntry(profileType, profileValue );
     }
 
+  sqlite3_finalize(stmt);
+
   return profile;
 }
   
@@ -329,7 +329,6 @@
   sqlite3_bind_int(stmt, 4, (isIntroducer ? 1 : 0));
 
   int res = sqlite3_step (stmt);
-  // _LOG_DEBUG("res " << res);
   sqlite3_finalize (stmt);
 
   Ptr<ProfileData> profileData = contact.getSelfEndorseCertificate().getProfileData();
@@ -509,6 +508,8 @@
       profile->setProfileEntry(profileType, profileValue);
     }
 
+  sqlite3_finalize(stmt);
+
   return profile;
 }
 
@@ -653,8 +654,6 @@
       Ptr<Blob> blob = endorseCertificate.encodeToWire();
       sqlite3_bind_text(stmt, 4, blob->buf(), blob->size(), SQLITE_TRANSIENT);
       int res = sqlite3_step (stmt);
-      // if(res != SQLITE_OK)
-      //   _LOG_DEBUG("Insert CollectEndorse Failure: " << getCertName.toUri());
       sqlite3_finalize (stmt); 
       return;
     }
@@ -667,8 +666,6 @@
       sqlite3_bind_text(stmt, 3, endorserName.toUri().c_str(), endorserName.toUri().size(), SQLITE_TRANSIENT);
       sqlite3_bind_text(stmt, 4, endorseeName.toUri().c_str(), endorseeName.toUri().size(), SQLITE_TRANSIENT);
       int res = sqlite3_step (stmt);
-      // if(res != SQLITE_OK)
-      //   _LOG_DEBUG("Insert CollectEndorse Failure: " << getCertName.toUri());
       sqlite3_finalize (stmt); 
       return;
     }
@@ -689,5 +686,7 @@
       collectEndorseList->push_back(blob);
     }
 
+  sqlite3_finalize (stmt);
+
   return collectEndorseList;
 }
