diff --git a/src/transport/stream-transport.hpp b/src/transport/stream-transport.hpp
index 737842c..d7f2e49 100644
--- a/src/transport/stream-transport.hpp
+++ b/src/transport/stream-transport.hpp
@@ -127,6 +127,9 @@
       }
   }
 
+  /**
+   * @warning Must not be called directly or indirectly from within handleAsyncReceive invocation
+   */
   void
   resume()
   {
diff --git a/src/transport/tcp-transport.cpp b/src/transport/tcp-transport.cpp
index a5b311f..c43790f 100644
--- a/src/transport/tcp-transport.cpp
+++ b/src/transport/tcp-transport.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2015 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -41,52 +41,39 @@
 TcpTransport::create(const ConfigFile& config)
 {
   const auto hostAndPort(getDefaultSocketHostAndPort(config));
-  return make_shared<TcpTransport>(hostAndPort.first,
-                                   hostAndPort.second);
+  return make_shared<TcpTransport>(hostAndPort.first, hostAndPort.second);
 }
 
 std::pair<std::string, std::string>
 TcpTransport::getDefaultSocketHostAndPort(const ConfigFile& config)
 {
   const ConfigFile::Parsed& parsed = config.getParsedConfiguration();
+
   std::string host = "localhost";
   std::string port = "6363";
 
-  try
-    {
-      const util::FaceUri uri(parsed.get<std::string>("transport"));
+  try {
+    const util::FaceUri uri(parsed.get<std::string>("transport", "tcp://" + host));
 
-      const std::string scheme = uri.getScheme();
-      if (scheme != "tcp" && scheme != "tcp4" && scheme != "tcp6")
-        {
-          throw Transport::Error("Cannot create TcpTransport from \"" +
-                                 scheme + "\" URI");
-        }
-
-      if (!uri.getHost().empty())
-        {
-          host = uri.getHost();
-        }
-
-      if (!uri.getPort().empty())
-        {
-          port = uri.getPort();
-        }
-    }
-  catch (const boost::property_tree::ptree_bad_path& error)
-    {
-      // no transport specified, use default host and port
-    }
-  catch (const boost::property_tree::ptree_bad_data& error)
-    {
-      throw ConfigFile::Error(error.what());
-    }
-  catch (const util::FaceUri::Error& error)
-    {
-      throw ConfigFile::Error(error.what());
+    const std::string scheme = uri.getScheme();
+    if (scheme != "tcp" && scheme != "tcp4" && scheme != "tcp6") {
+      throw Transport::Error("Cannot create TcpTransport from \"" +
+                             scheme + "\" URI");
     }
 
-  return std::make_pair(host, port);
+    if (!uri.getHost().empty()) {
+      host = uri.getHost();
+    }
+
+    if (!uri.getPort().empty()) {
+      port = uri.getPort();
+    }
+  }
+  catch (const util::FaceUri::Error& error) {
+    throw ConfigFile::Error(error.what());
+  }
+
+  return {host, port};
 }
 
 void
