diff --git a/src/command.c b/src/command.c
index b22f03d1a6f121d24ec4f7ceab2badd4daff4025..f73bb3b262113f130f090f167cd1b19c8e3ef964 100644
--- a/src/command.c
+++ b/src/command.c
@@ -794,8 +794,8 @@ static void COM_Exec_f(void)
 		CONS_Printf(M_GetText("executing %s\n"), COM_Argv(1));
 
 	// insert text file into the command buffer
-	COM_BufAddText((char *)buf);
-	COM_BufAddText("\n");
+	COM_BufAddTextEx((char *)buf, com_flags);
+	COM_BufAddTextEx("\n", com_flags);
 
 	// free buffer
 	Z_Free(buf);