diff --git a/Participant.cpp b/Participant.cpp
index 77e5381..fa595d5 100644
--- a/Participant.cpp
+++ b/Participant.cpp
@@ -256,10 +256,13 @@ void Participant::Process(ThingMsg *msg) {}
 void Participant::Process(NameMsg *msg) {
   Thing *thing = this->Get(msg->networkId, msg->thingId);
   if (thing != nullptr) {
-    char *thingName = new char[strlen(msg->name)];
+    int nameLength = msg->nameLength;
+    char *thingName = new char[nameLength + 1];
     strcpy(thingName, msg->name);
+    thingName[nameLength] = '\0';
     thing->name = thingName;
-    std::cout << "thing name = " << thing->name << "\n";
+    std::cout << "thing name = " << thing->name << " length = " << nameLength
+              << "\n";
   }
 }
 
@@ -272,7 +275,7 @@ void Participant::Process(CustomMsg *msg) {
   else
     std::cout << "custom msg for unknown thing " << (int)msg->networkId << ":"
               << (int)msg->thingId << "\n";
-  std::cout << "Processed custom msg\n";
+  // std::cout << "Processed custom msg\n";
 }
 
 // Receive
@@ -281,8 +284,8 @@ void Participant::Process(CustomMsg *msg) {
 #pragma region Things
 
 Thing *Participant::Get(unsigned char networkId, unsigned char thingId) {
-  std::cout << "Get " << (int)networkId << "/" << (int)thingId << " from "
-            << this->things.size() << " things\n";
+  // std::cout << "Get " << (int)networkId << "/" << (int)thingId << " from "
+  //           << this->things.size() << " things\n";
   for (auto &thing : this->things) {
     // std::cout << "  ? " << (int)thing->networkId << "/" << (int)thing->id
     //           << "\n";