diff --git a/ChangeLog b/ChangeLog
index 3318e0e2a6c1810a6342b1ad71c5ec982b318efb..e34ad8289930cfc254539519d8922a02cfdc2323 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -130,6 +130,10 @@ CVS code -
 	  NANO_SMALL is defined and DISABLE_SPELLER isn't.  Also, turn
 	  the USE_REGEXP flag off during spell checking in order to
 	  avoid a potential segfault. (DLR)
+  do_alt_speller()
+	- Call terminal_init() unconditionally after running the
+	  alternate spell checker, so that the terminal state is
+	  properly restored in all cases. (DLR)
   justify_format()
 	- For more compatibility with Pico, remove extra space after a
 	  character in punct if that character is the same as the one
diff --git a/src/nano.c b/src/nano.c
index 5c6ad0f7ffd242af77904f7a19e03547f1d130f8..8c618b2f82964641282ede6e92bd9595f15718e7 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1782,6 +1782,9 @@ const char *do_alt_speller(char *tempfile_name)
 
     refresh();
 
+    /* Restore the terminal to its previous state. */
+    terminal_init();
+
 #ifndef NANO_SMALL
     if (old_mark_set) {
 	do_gotopos(mbb_lineno_cur, mark_beginx, y_cur, 0);
@@ -1793,7 +1796,6 @@ const char *do_alt_speller(char *tempfile_name)
 #endif
 	/* Only reload the temp file if it isn't a marked selection. */
 	free_filestruct(fileage);
-	terminal_init();
 	global_init(TRUE);
 
 	/* Do what load_buffer() would do, except for making a new