diff --git a/exec/lbshell.js b/exec/lbshell.js
index d126eb92a0ce85e8b86d7792431200aec536ad74..5cdfff818a51148201eb06da2688c9d407c3f69f 100644
--- a/exec/lbshell.js
+++ b/exec/lbshell.js
@@ -707,6 +707,10 @@ while(bbs.online) {
 						handle_a_ctrlkey(x_prog);
 						continue;
 					}
+					if (xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].number === undefined) {
+						console.beep();
+						continue;
+					}
 					stop_mouse();
 					clear_screen();