diff --git a/exec/str_cmds.js b/exec/str_cmds.js
index e91d9c7a201d18a64a325e12de959f10c0402767..1b5ae015829569cc8e2e1e44ebec51788a4b93a7 100644
--- a/exec/str_cmds.js
+++ b/exec/str_cmds.js
@@ -112,7 +112,7 @@ function str_cmds(str)
 			writeln("LIST <filename>");
 			writeln("\tDisplays a file.");
 		}
-		if(str=="LIST") {
+		if(word=="LIST") {
 			if(bbs.check_syspass()) {
 				str=str.substr(4);
 				console.printfile(get_arg(str));