diff --git a/src/sbbs3/ftpsrvr.c b/src/sbbs3/ftpsrvr.c
index 5d8c9d329cda20511ebe1f9559efa0dc4c56de26..c6589d59aa0cbdd5fd23b71d39bc9222d0b2e5d3 100644
--- a/src/sbbs3/ftpsrvr.c
+++ b/src/sbbs3/ftpsrvr.c
@@ -4590,7 +4590,7 @@ static void cleanup(int code, int line)
 	if(terminate_server || code)
 		lprintf(LOG_INFO,"#### FTP Server thread terminated (%lu clients served)", served);
 	if(thread_count)
-		lprintf(LOG_ERR,"#### !FTP Server threads (%u) remain active after termination", thread_count);
+		lprintf(LOG_WARNING,"#### !FTP Server threads (%u) remain after termination", thread_count);
 	if(startup!=NULL && startup->terminated!=NULL)
 		startup->terminated(startup->cbdata,code);
 }
diff --git a/src/sbbs3/mailsrvr.c b/src/sbbs3/mailsrvr.c
index dde736617fd9630e194ce5569b557687d9fb9dac..333a0d08109e12d1f393fbe246db528b970254dc 100644
--- a/src/sbbs3/mailsrvr.c
+++ b/src/sbbs3/mailsrvr.c
@@ -2371,6 +2371,7 @@ static void smtp_thread(void* arg)
 	srand(time(NULL) ^ (DWORD)GetCurrentThreadId());	/* seed random number generator */
 	rand();	/* throw-away first result */
 	SAFEPRINTF4(session_id,"%x%x%x%lx",getpid(),socket,rand(),clock());
+	lprintf(LOG_DEBUG,"%04d SMTP Session ID=%s", socket, session_id);
 	SAFEPRINTF2(msgtxt_fname,"%sSBBS_SMTP.%s.msg", scfg.temp_dir, session_id);
 	SAFEPRINTF2(newtxt_fname,"%sSBBS_SMTP.%s.new", scfg.temp_dir, session_id);
 	SAFEPRINTF2(logtxt_fname,"%sSBBS_SMTP.%s.log", scfg.temp_dir, session_id);
@@ -4628,7 +4629,7 @@ static void cleanup(int code)
 		lprintf(LOG_INFO,"#### Mail Server thread terminated (%s)",str);
 	}
 	if(thread_count)
-		lprintf(LOG_ERR,"#### !Mail Server threads (%u) remain active after termination", thread_count);
+		lprintf(LOG_WARNING,"#### !Mail Server threads (%u) remain after termination", thread_count);
 	if(startup!=NULL && startup->terminated!=NULL)
 		startup->terminated(startup->cbdata,code);
 }
diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp
index ac4c7afa76601c81b175f9a7f15fefeca0fd5f35..6e8bc5622485cc7b0af6c76400b59cb157f4cf6a 100644
--- a/src/sbbs3/main.cpp
+++ b/src/sbbs3/main.cpp
@@ -4264,7 +4264,7 @@ static void cleanup(int code)
 	if(terminate_server || code)
 		lprintf(LOG_INFO,"Terminal Server thread terminated (%lu clients served)", served);
 	if(thread_count)
-		lprintf(LOG_ERR,"!Terminal Server threads (%u) remain active after termination", thread_count);
+		lprintf(LOG_WARNING,"!Terminal Server threads (%u) remain after termination", thread_count);
 	if(startup->terminated!=NULL)
 		startup->terminated(startup->cbdata,code);
 }
@@ -4849,6 +4849,7 @@ NO_SSH:
 		}
 
     	sbbs->online=FALSE;
+		sbbs->client_socket=INVALID_SOCKET;
 #ifdef USE_CRYPTLIB
 		sbbs->ssh_mode=false;
 #endif
diff --git a/src/sbbs3/websrvr.c b/src/sbbs3/websrvr.c
index ac28ad75f8d1057418de9847c432be52e6ce8420..ddb5ad5a74adde22cf0bad62c7d5f40c9a95b8c0 100644
--- a/src/sbbs3/websrvr.c
+++ b/src/sbbs3/websrvr.c
@@ -5182,7 +5182,7 @@ static void cleanup(int code)
 	if(terminate_server || code)
 		lprintf(LOG_INFO,"#### Web Server thread terminated (%lu clients served)", served);
 	if(thread_count)
-		lprintf(LOG_ERR,"#### !Web Server threads (%u) remain active after termination", thread_count);
+		lprintf(LOG_WARNING,"#### !Web Server threads (%u) remain after termination", thread_count);
 	if(startup!=NULL && startup->terminated!=NULL)
 		startup->terminated(startup->cbdata,code);
 }