diff --git a/dap-sdk/core/src/dap_common.c b/dap-sdk/core/src/dap_common.c
index cfbd52714978753e5f265e919c3f617aa5a9c1fd..78b63ee843138428d81c0942e56645f498e1eeb0 100755
--- a/dap-sdk/core/src/dap_common.c
+++ b/dap-sdk/core/src/dap_common.c
@@ -320,7 +320,7 @@ static void *s_log_thread_proc(void *arg) {
         }
         pthread_mutex_unlock(&s_log_mutex);
     }
-    pthread_exit(NULL);
+    return NULL;
 }
 
 /**
diff --git a/dap-sdk/net/client/dap_client.c b/dap-sdk/net/client/dap_client.c
index 14ed72dff2597fb613140a9946c67b3e77c23869..b9d5506239e8452df98137754159a98383c78e47 100644
--- a/dap-sdk/net/client/dap_client.c
+++ b/dap-sdk/net/client/dap_client.c
@@ -208,6 +208,7 @@ void dap_client_delete(dap_client_t * a_client)
     // a_client will be deleted in dap_events_socket_delete() -> free( a_es->_inheritor );
     //DAP_DELETE(a_client);
     DAP_DELETE(a_client);
+    a_client = NULL;
 }
 
 /**
diff --git a/dap-sdk/net/core/dap_traffic_track.c b/dap-sdk/net/core/dap_traffic_track.c
index ad9c6c661d8ea3dfb9b303a9fc4a4bb3e29f02d9..44c7506a6c426d84dcdfd0ce7aec280e8f766b46 100644
--- a/dap-sdk/net/core/dap_traffic_track.c
+++ b/dap-sdk/net/core/dap_traffic_track.c
@@ -97,8 +97,6 @@ void *_worker_run( void *a )
   }
 
   pthread_mutex_unlock( &_mutex );
-  pthread_exit( NULL );
-
   return NULL;
 }
 
diff --git a/modules/global-db/dap_chain_global_db_driver.c b/modules/global-db/dap_chain_global_db_driver.c
index 775bf47fda6b453fd61c004c2f055fd70c3bd53c..b1e80583100dff38df943ec1daddc158b286f400 100644
--- a/modules/global-db/dap_chain_global_db_driver.c
+++ b/modules/global-db/dap_chain_global_db_driver.c
@@ -461,7 +461,7 @@ static void* func_write_buf(void * arg)
             wait_data(&s_mutex_cond, &s_cond_add_end, 2000); // 2 sec
         }
     }
-    pthread_exit(0);
+    return NULL;
 }
 #endif //USE_WRITE_BUFFER
 
diff --git a/modules/global-db/dap_chain_global_db_hist.c b/modules/global-db/dap_chain_global_db_hist.c
index 1f63e6839dd29ff2b9e19e664d9a5a40d1a3b3c1..b0d510b689678440e904cbe4970a6832c53698b5 100644
--- a/modules/global-db/dap_chain_global_db_hist.c
+++ b/modules/global-db/dap_chain_global_db_hist.c
@@ -1311,8 +1311,7 @@ static void *s_list_thread_proc(void *arg)
     pthread_mutex_lock(&l_dap_db_log_list->list_mutex);
     l_dap_db_log_list->is_process = false;
     pthread_mutex_unlock(&l_dap_db_log_list->list_mutex);
-    pthread_exit(0);
-    return 0;
+    return NULL;
 }
 
 /**
diff --git a/modules/net/dap_chain_node_cli_cmd.c b/modules/net/dap_chain_node_cli_cmd.c
index 52e6d728d80ce0c6eb2cfaf4a7d2065d0627763d..cff20b4b198bb43971438e4eab30db2fc46234a3 100644
--- a/modules/net/dap_chain_node_cli_cmd.c
+++ b/modules/net/dap_chain_node_cli_cmd.c
@@ -73,7 +73,9 @@
 #include "dap_chain_node_cli_cmd_tx.h"
 #include "dap_chain_node_ping.h"
 #include "dap_chain_net_srv.h"
+#ifndef _WIN32
 #include "dap_chain_net_vpn_client.h"
+#endif
 #include "dap_chain_cell.h"
 
 #include "dap_chain_common.h"