--- Sources/TSDocument.m.orig	2012-05-28 15:18:07.000000000 -0500
+++ Sources/TSDocument.m	2012-08-27 14:55:07.000000000 -0500
@@ -1209,7 +1209,8 @@
 				if ([theChecker setLanguage:spellcheckString]) {
 					spellLanguageChanged = YES;
 					if ([theChecker respondsToSelector:@selector(setAutomaticallyIdentifiesLanguages:)])
-						automaticLanguage = [theChecker setAutomaticallyIdentifiesLanguages:NO];
+						automaticLanguage = NO;
+						[theChecker setAutomaticallyIdentifiesLanguages:NO];
 					if (spellLanguage != nil)
 						[spellLanguage release];
 					spellLanguage = [spellcheckString retain];
@@ -1426,12 +1427,14 @@
 	if (spellLanguage != nil) {
 		[theChecker setLanguage:spellLanguage]; 
 		if ([theChecker respondsToSelector:@selector(setAutomaticallyIdentifiesLanguages:)])
-			automaticLanguage = [theChecker setAutomaticallyIdentifiesLanguages:NO];
+			automaticLanguage = NO;
+			[theChecker setAutomaticallyIdentifiesLanguages:NO];
 	}
 	else {
 		[theChecker setLanguage:defaultLanguage]; 
 		if ([theChecker respondsToSelector:@selector(setAutomaticallyIdentifiesLanguages:)])
-			automaticLanguage = [theChecker setAutomaticallyIdentifiesLanguages:automaticLanguage];
+			automaticLanguage = NO;
+			[theChecker setAutomaticallyIdentifiesLanguages:automaticLanguage];
 	}
 }
 
