diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 4bdb102..3cc56f3 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -81,6 +81,9 @@
   memset (app, 0, sizeof (*app));
   app->index = application_get_index (app);
   app->connects_seg_manager = ~0;
+  app->first_segment_manager = ~0;
+  if (CLIB_DEBUG > 1)
+    clib_warning ("[%d] New app (%d)", getpid (), app->index);
   return app;
 }
 
@@ -97,6 +100,8 @@
    * The app event queue allocated in first segment is cleared with
    * the segment manager. No need to explicitly free it.
    */
+  if (CLIB_DEBUG > 1)
+    clib_warning ("[%d] Delete app (%d)", getpid (), app->index);
 
   /*
    * Cleanup segment managers
@@ -123,6 +128,12 @@
       vnet_unbind (a);
     }
 
+  if (app->first_segment_manager != ~0)
+    {
+      sm = segment_manager_get (app->first_segment_manager);
+      segment_manager_first_segment_maybe_del (sm);
+    }
+
   application_table_del (app);
   pool_put (app_pool, app);
 }
@@ -214,7 +225,6 @@
   if (app->first_segment_manager != (u32) ~ 0)
     {
       sm = segment_manager_get (app->first_segment_manager);
-      app->first_segment_manager = ~0;
       return sm;
     }
 
@@ -288,6 +298,7 @@
 
   sm = segment_manager_get (*indexp);
   segment_manager_del (sm);
+  srv->first_segment_manager = ~0;
   hash_unset (srv->listeners_table, handle);
   listen_session_del (listener);
 
diff --git a/src/vnet/session/application_interface.c b/src/vnet/session/application_interface.c
index f74b0cf..338ae85 100644
--- a/src/vnet/session/application_interface.c
+++ b/src/vnet/session/application_interface.c
@@ -113,7 +113,7 @@
 
   if (!app)
     {
-      clib_warning ("app not attached");
+      clib_warning ("app (%d) not attached", app_index);
       return VNET_API_ERROR_APPLICATION_NOT_ATTACHED;
     }
 
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index bf57196..dcef626 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -67,7 +67,6 @@
     {
       clib_warning ("svm_fifo_segment_create ('%s', %d) failed",
 		    ca->segment_name, ca->segment_size);
-      vec_free (segment_name);
       return VNET_API_ERROR_SVM_SEGMENT_CREATE_FAIL;
     }
 
@@ -167,7 +166,24 @@
   return 0;
 }
 
-/**
+void
+segment_manager_first_segment_maybe_del (segment_manager_t * sm)
+{
+  svm_fifo_segment_private_t *fifo_segment;
+
+  /* If the first semgment has no fifos, then delete the 1st segment
+   */
+  fifo_segment = svm_fifo_get_segment (sm->segment_indices[0]);
+  if (!svm_fifo_segment_has_fifos (fifo_segment))
+    {
+      clib_spinlock_lock (&sm->lockp);
+      svm_fifo_segment_delete (fifo_segment);
+      vec_del1 (sm->segment_indices, 0);
+      clib_spinlock_unlock (&sm->lockp);
+    }
+}
+
+  /**
  * Removes segment manager.
  *
  * Since the fifos allocated in the segment keep backpointers to the sessions
@@ -178,11 +194,12 @@
 segment_manager_del (segment_manager_t * sm)
 {
   int j;
+  svm_fifo_segment_private_t *fifo_segment;
+  ASSERT (vec_len (sm->segment_indices));
 
   /* Across all fifo segments used by the server */
   for (j = 0; j < vec_len (sm->segment_indices); j++)
     {
-      svm_fifo_segment_private_t *fifo_segment;
       svm_fifo_t *fifo;
 
       /* Vector of fifos allocated in the segment */
@@ -216,6 +233,8 @@
        */
     }
 
+  segment_manager_first_segment_maybe_del (sm);
+
   clib_spinlock_free (&sm->lockp);
   pool_put (segment_managers, sm);
 }
diff --git a/src/vnet/session/segment_manager.h b/src/vnet/session/segment_manager.h
index d4b7320..df38d2b 100644
--- a/src/vnet/session/segment_manager.h
+++ b/src/vnet/session/segment_manager.h
@@ -96,6 +96,7 @@
 void segment_manager_get_segment_info (u32 index, u8 ** name, u32 * size);
 int
 session_manager_add_first_segment (segment_manager_t * sm, u32 segment_size);
+void segment_manager_first_segment_maybe_del (segment_manager_t * sm);
 int session_manager_add_segment (segment_manager_t * sm);
 void segment_manager_del (segment_manager_t * sm);
 int
