diff --git a/src/netopeerguid.c b/src/netopeerguid.c
index a967772..8c8ffdc 100644
--- a/src/netopeerguid.c
+++ b/src/netopeerguid.c
@@ -1216,7 +1216,6 @@
 {
     int i;
 
-    DEBUG("lock private lock.");
     DEBUG("LOCK mutex %s", __func__);
     if (pthread_mutex_lock(&locked_session->lock) != 0) {
         ERROR("Error while locking rwlock");
@@ -1228,13 +1227,11 @@
         locked_session->session = NULL;
     }
     DEBUG("session closed.");
-    DEBUG("unlock private lock.");
     DEBUG("UNLOCK mutex %s", __func__);
     if (pthread_mutex_unlock(&locked_session->lock) != 0) {
         ERROR("Error while locking rwlock");
     }
 
-    DEBUG("unlock session lock.");
     DEBUG("closed session, disabled notif(?), wait 0.5s");
     usleep(500000); /* let notification thread stop */
 
@@ -1263,9 +1260,8 @@
     DEBUG("Session to close: %u", session_key);
 
     /* get exclusive (write) access to sessions_list (conns) */
-    DEBUG("lock session lock.");
     DEBUG("LOCK wrlock %s", __func__);
-    if (pthread_rwlock_wrlock (&session_lock) != 0) {
+    if (pthread_rwlock_wrlock(&session_lock) != 0) {
         ERROR("Error while locking rwlock");
         (*reply) = create_error_reply("Internal: Error while locking.");
         return EXIT_FAILURE;
@@ -1276,6 +1272,7 @@
          locked_session = locked_session->next);
 
     if (!locked_session) {
+        DEBUG("UNLOCK wrlock %s", __func__);
         pthread_rwlock_unlock(&session_lock);
         ERROR("Could not find the session %u to close.", session_key);
         (*reply) = create_error_reply("Internal: Error while finding a session.");
@@ -3109,7 +3106,7 @@
 
             DEBUG("UNLOCK mutex %s", __func__);
             pthread_mutex_unlock(&locked_session->lock);
-            DEBUG("LOCK mutex %s", __func__);
+            DEBUG("LOCK ntf mutex %s", __func__);
             pthread_mutex_lock(&ntf_history_lock);
             pthread_mutex_lock(&json_lock);
             json_object *notif_history_array = json_object_new_array();
@@ -3126,7 +3123,7 @@
             //json_object_put(notif_history_array);
             pthread_mutex_unlock(&json_lock);
 
-            DEBUG("UNLOCK mutex %s", __func__);
+            DEBUG("UNLOCK ntf mutex %s", __func__);
             pthread_mutex_unlock(&ntf_history_lock);
             DEBUG("closing temporal NC session.");
             nc_session_free(temp_session, NULL);
@@ -3532,7 +3529,7 @@
 
     /* get exclusive access to sessions_list (conns) */
     DEBUG("LOCK wrlock %s", __func__);
-    if ((ret = pthread_rwlock_wrlock (&session_lock)) != 0) {
+    if ((ret = pthread_rwlock_wrlock(&session_lock)) != 0) {
         ERROR("Error while locking rwlock: %d (%s)", ret, strerror(ret));
         return;
     }
@@ -3548,7 +3545,7 @@
 
     /* get exclusive access to sessions_list (conns) */
     DEBUG("UNLOCK wrlock %s", __func__);
-    if (pthread_rwlock_unlock (&session_lock) != 0) {
+    if (pthread_rwlock_unlock(&session_lock) != 0) {
         ERROR("Error while unlocking rwlock: %d (%s)", errno, strerror(errno));
     }
 }
@@ -3562,6 +3559,7 @@
     int ret;
 
     /* get exclusive access to sessions_list (conns) */
+    DEBUG("LOCK wrlock %s", __func__);
     if ((ret = pthread_rwlock_wrlock(&session_lock)) != 0) {
         DEBUG("Error while locking rwlock: %d (%s)", ret, strerror(ret));
         return;
@@ -3571,17 +3569,14 @@
         if (ns == NULL) {
             continue;
         }
-        pthread_mutex_lock(&locked_session->lock);
         if ((current_time - locked_session->last_activity) > ACTIVITY_TIMEOUT) {
             DEBUG("Closing NETCONF session %u (SID %u).", locked_session->session_key, nc_session_get_id(locked_session->session));
 
             /* close_and_free_session handles locking on its own */
             close_and_free_session(locked_session);
-        } else {
-            pthread_mutex_unlock(&locked_session->lock);
         }
     }
-    /* get exclusive access to sessions_list (conns) */
+    DEBUG("UNLOCK wrlock %s", __func__);
     if (pthread_rwlock_unlock(&session_lock) != 0) {
         ERROR("Error while unlocking rwlock: %d (%s)", errno, strerror(errno));
     }
