diff --git a/src/g_game.c b/src/g_game.c
index 1c37b3b7182cc38e5eeaeb42fa9b017caabf708a..2f2ac043a0dd45c0f4ca2929769b0b2e5e40df89 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -3661,7 +3661,8 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
 		unlocktriggers = 0;
 
 		// clear itemfinder, just in case
-		CV_StealthSetValue(&cv_itemfinder, 0);
+		if (!dedicated)	// except in dedicated servers, where it is not registered and can actually I_Error debug builds
+			CV_StealthSetValue(&cv_itemfinder, 0);
 	}
 
 	// internal game map
diff --git a/src/hu_stuff.c b/src/hu_stuff.c
index 771628efbf8b514bbf735451ebaad845c30e4b6e..8d51bf3fa8acdaed79ecaa982cc70ff76944dbe0 100644
--- a/src/hu_stuff.c
+++ b/src/hu_stuff.c
@@ -465,11 +465,15 @@ static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags)
 		{
 			// check if nodenum[1] is a space
 			if (nodenum[1] == ' ')
+			{
 				spc = 0;
+				free(nodenum);	// don't need this anymore.
 				// let it slide
+			}
 			else
 			{
 				HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm<node> \'.", false);
+				free(nodenum);
 				return;
 			}
 		}
@@ -479,11 +483,13 @@ static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags)
 				if (msg[5] != ' ')
 				{
 					HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm<node> \'.", false);
+					free(nodenum);
 					return;
 				}
 			}
 
 		target = atoi((const char*) nodenum);	// turn that into a number
+		free(nodenum);
 		//CONS_Printf("%d\n", target);
 
 		// check for target player, if it doesn't exist then we can't send the message!
@@ -906,6 +912,27 @@ static boolean teamtalk = false;
 static INT32 head = 0, tail = 0;*/
 // WHY DO YOU OVERCOMPLICATE EVERYTHING?????????
 
+// Clear spaces so we don't end up with messages only made out of emptiness
+static boolean HU_clearChatSpaces()
+{
+	size_t i = 0;	// Used to just check our message
+	char c;						// current character we're iterating.
+	boolean nothingbutspaces = true;
+
+	for (; i < strlen(w_chat); i++)	// iterate through message and eradicate all spaces that don't belong.
+	{
+		c = w_chat[i];
+		if (!c)
+			break;	// if there's nothing, it's safe to assume our message has ended, so let's not waste any more time here.
+
+		if (c != ' ')	// Isn't a space
+		{
+			nothingbutspaces = false;
+		}
+	}
+	return nothingbutspaces;
+}
+
 //
 //
 static void HU_queueChatChar(char c)
@@ -919,6 +946,9 @@ static void HU_queueChatChar(char c)
 		size_t ci = 2;
 		INT32 target = 0;
 
+		if (HU_clearChatSpaces())	// Avoids being able to send empty messages, or something.
+			return;	// If this returns true, that means our message was NOTHING but spaces, so don't send it period.
+
 		do {
 			c = w_chat[-2+ci++];
 			if (!c || (c >= ' ' && !(c & 0x80))) // copy printable characters and terminating '\0' only.
@@ -959,11 +989,15 @@ static void HU_queueChatChar(char c)
 			{
 				// check if nodenum[1] is a space
 				if (nodenum[1] == ' ')
+				{
 					spc = 0;
+					free(nodenum);
 					// let it slide
+				}
 				else
 				{
 					HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm<node> \'.", false);
+					free(nodenum);
 					return;
 				}
 			}
@@ -973,11 +1007,13 @@ static void HU_queueChatChar(char c)
 				if (msg[5] != ' ')
 				{
 					HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm<node> \'.", false);
+					free(nodenum);
 					return;
 				}
 			}
 
 			target = atoi((const char*) nodenum);	// turn that into a number
+			free(nodenum);
 			//CONS_Printf("%d\n", target);
 
 			// check for target player, if it doesn't exist then we can't send the message!
@@ -1735,8 +1771,8 @@ static void HU_DrawChat(void)
 		}
 		if (count == 0)	// no results.
 		{
-			V_DrawFillConsoleMap(chatx-50, p_dispy- (6*count), 48, 6, 239 | V_SNAPTOBOTTOM | V_SNAPTOLEFT);	// fill it like the chat so the text doesn't become hard to read because of the hud.
-			V_DrawSmallString(chatx-48, p_dispy- (6*count), V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_ALLOWLOWERCASE, "NO RESULT.");
+			V_DrawFillConsoleMap(chatx+boxw+2, p_dispy- (6*count), 48, 6, 239 | V_SNAPTOBOTTOM | V_SNAPTOLEFT);	// fill it like the chat so the text doesn't become hard to read because of the hud.
+			V_DrawSmallString(chatx+boxw+4, p_dispy- (6*count), V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_ALLOWLOWERCASE, "NO RESULT.");
 		}
 	}
 
diff --git a/src/lua_baselib.c b/src/lua_baselib.c
index 6b1456e9a77b33a09f1946a8b537ffb54dca6865..6ae4ad8cfb6b75a60fe15e804e83ed0fbc47ff9d 100644
--- a/src/lua_baselib.c
+++ b/src/lua_baselib.c
@@ -95,7 +95,7 @@ static int lib_print(lua_State *L)
 static int lib_chatprint(lua_State *L)
 {
 	const char *str = luaL_checkstring(L, 1);	// retrieve string
-	boolean sound = luaL_checkboolean(L, 2);	// retrieve sound boolean
+	boolean sound = lua_optboolean(L, 2);	// retrieve sound boolean
 	int len = strlen(str);
 
 	if (str == NULL)	// error if we don't have a string!
@@ -113,7 +113,7 @@ static int lib_chatprintf(lua_State *L)
 {
 	int n = lua_gettop(L);  /* number of arguments */
 	const char *str = luaL_checkstring(L, 2);	// retrieve string
-	boolean sound = luaL_checkboolean(L, 3);	// sound?
+	boolean sound = lua_optboolean(L, 3);	// sound?
 	int len = strlen(str);
 	player_t *plr;
 
diff --git a/src/m_menu.c b/src/m_menu.c
index 380ba266bc0de917c7630626ab99f27bfcb04bd6..8f71c97a2b4d1b7a011d8b57ae5dd808e667d9ee 100644
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -6344,6 +6344,10 @@ static void M_DrawConnectIPMenu(void)
 static void M_ConnectIP(INT32 choice)
 {
 	(void)choice;
+
+	if (*setupm_ip == 0)
+		return;
+
 	COM_BufAddText(va("connect \"%s\"\n", setupm_ip));
 
 	// A little "please wait" message.