Index: /CKEditor/trunk/_source/plugins/maximize/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/maximize/plugin.js	(revision 3447)
+++ /CKEditor/trunk/_source/plugins/maximize/plugin.js	(revision 3448)
@@ -250,8 +250,9 @@
 				} );
 
+			// Restore the command state after mode change.
 			editor.on( 'mode', function()
 				{
 					editor.getCommand( 'maximize' ).setState( savedState );
-				} );
+				}, null, null, 100 );
 		}
 	} );
Index: /CKEditor/trunk/_source/plugins/showblocks/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/showblocks/plugin.js	(revision 3447)
+++ /CKEditor/trunk/_source/plugins/showblocks/plugin.js	(revision 3448)
@@ -122,11 +122,10 @@
 				} );
 
-			editor.on( 'contentDom', function()
+			// Restore the command state after mode change.
+			editor.on( 'mode', function()
 			{
-				// Restore show blocks state after mode switches.
-				command.setState( CKEDITOR.TRISTATE_OFF );
-				if ( this._.showBlocks )
+				if ( editor.mode == 'wysiwyg' && this._.showBlocks )
 					command.exec();
-			} );
+			}, null, null, 100 );
 		}
 	});
