diff --git a/src/torrent-manager.cpp b/src/torrent-manager.cpp
index 110d90f..892228f 100644
--- a/src/torrent-manager.cpp
+++ b/src/torrent-manager.cpp
@@ -17,6 +17,7 @@
 #include <string>
 #include <unordered_map>
 #include <vector>
+#include <boost/asio/io_service.hpp>
 
 namespace fs = boost::filesystem;
 
@@ -32,7 +33,6 @@
   security::KeyChain key_chain;
   Name currSegmentFullName = initialSegmentName;
   vector<TorrentFile> torrentSegments = IoUtil::load_directory<TorrentFile>(torrentFilePath);
-
   // Starting with the initial segment name, verify the names, loading next name from torrentSegment
   for (auto it = torrentSegments.begin(); it != torrentSegments.end(); ++it) {
     TorrentFile& segment = *it;
@@ -169,10 +169,10 @@
   // figure out the name of the torrent
   Name torrentName;
   if (m_torrentFileName.get(m_torrentFileName.size() - 2).isSequenceNumber()) {
-    torrentName = m_torrentFileName.getSubName(1, m_torrentFileName.size() - 4);
+    torrentName = m_torrentFileName.getSubName(3, m_torrentFileName.size() - 6);
   }
   else {
-    torrentName = m_torrentFileName.getSubName(1, m_torrentFileName.size() - 3);
+    torrentName = m_torrentFileName.getSubName(3, m_torrentFileName.size() - 5);
   }
 
   // TODO(spyros) Get update manager working
@@ -406,7 +406,6 @@
       this->sendInterest();
       if (m_pendingInterests.empty() && m_interestQueue->empty() && !m_seedFlag) {
         shutdown();
-        return;
       }
   };
 
@@ -520,6 +519,12 @@
                            bind(&TorrentManager::onRegisterFailed, this, _1, _2));
 }
 
+void
+TorrentManager::shutdown()
+{
+  m_face->getIoService().stop();
+}
+
 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 //                                Protected Helpers
 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
@@ -650,7 +655,6 @@
     this->sendInterest();
     if (m_pendingInterests.empty() && m_interestQueue->empty() && !m_seedFlag) {
       shutdown();
-      return;
     }
   };
 
