diff --git a/index.html b/index.html
index 8009c4e..68956a4 100644
--- a/index.html
+++ b/index.html
@@ -113,6 +113,7 @@ By Joshua Bell
+
diff --git a/index.js b/index.js
index ee5ca68..21115c0 100644
--- a/index.js
+++ b/index.js
@@ -207,7 +207,7 @@ window.addEventListener('DOMContentLoaded', function () {
$("#btn_run").disabled = stopped ? "" : "disabled";
$("#lb_files").disabled = stopped ? "" : "disabled";
- if (btnFocus) {
+ if (btnFocus || stopped) {
$(stopped ? "#btn_run" : "#btn_stop").focus();
} else {
tty.focus();