Index: CKEditor/trunk/_source/plugins/justify/plugin.js
===================================================================
--- CKEditor/trunk/_source/plugins/justify/plugin.js	(revision 3608)
+++ CKEditor/trunk/_source/plugins/justify/plugin.js	(revision 3609)
@@ -67,42 +67,38 @@
 		exec : function( editor )
 		{
-			var selection = editor.getSelection();
-			if ( !selection )
+			var selection = editor.getSelection(),
+				range = selection && selection.getRanges()[0];
+
+			if ( !range )
 				return;
-			
+
 			var bookmarks = selection.createBookmarks(),
-				ranges = selection.getRanges();
+				cssClassName = this.cssClassName,
+				iterator = range.createIterator(),
+				block;
 
+			while ( ( block = iterator.getNextParagraph() ) )
+			{
+				block.removeAttribute( 'align' );
 
-			var cssClassName = this.cssClassName,
-				iterator,
-				block;
-			for ( var i = ranges.length-1 ; i >= 0 ; i-- ) {
-				iterator = ranges[ i ].createIterator();
-				while ( ( block = iterator.getNextParagraph() ) )
+				if ( cssClassName )
 				{
-					block.removeAttribute( 'align' );
-	
-					if ( cssClassName )
-					{
-						// Remove any of the alignment classes from the className.
-						var className = block.$.className =
-							CKEDITOR.tools.ltrim( block.$.className.replace( this.cssClassRegex, '' ) );
-	
-						// Append the desired class name.
-						if ( this.state == CKEDITOR.TRISTATE_OFF && !this.isDefaultAlign )
-							block.addClass( cssClassName );
-						else if ( !className )
-							block.removeAttribute( 'class' );
-					}
+					// Remove any of the alignment classes from the className.
+					var className = block.$.className =
+						CKEDITOR.tools.ltrim( block.$.className.replace( this.cssClassRegex, '' ) );
+
+					// Append the desired class name.
+					if ( this.state == CKEDITOR.TRISTATE_OFF && !this.isDefaultAlign )
+						block.addClass( cssClassName );
+					else if ( !className )
+						block.removeAttribute( 'class' );
+				}
+				else
+				{
+					if ( this.state == CKEDITOR.TRISTATE_OFF && !this.isDefaultAlign )
+						block.setStyle( 'text-align', this.value );
 					else
-					{
-						if ( this.state == CKEDITOR.TRISTATE_OFF && !this.isDefaultAlign )
-							block.setStyle( 'text-align', this.value );
-						else
-							block.removeStyle( 'text-align' );
-					}
+						block.removeStyle( 'text-align' );
 				}
-				
 			}
 
Index: CKEditor/trunk/_source/plugins/selection/plugin.js
===================================================================
--- CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 3608)
+++ CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 3609)
@@ -1,3 +1,3 @@
-﻿/*
+﻿﻿/*
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -870,33 +870,7 @@
 		{
 			var retval = [],
-				ranges = this.getRanges(),
-				length = ranges.length;
-			for ( var i = 0; i < length ; i++ )
-			{
-				// Updating the offset values for rest of ranges which have been mangled.
-				for ( var j = i + 1 ; j < length ; j++ )
-				{
-					retval.push( ranges[ i ].createBookmark( serializable, true ) );
-
-					var dirtyRange = ranges[ j ];
-					function updateDirtyRange( isRangeStart, isBookmarkStart )
-					{
-						if ( dirtyRange[ isRangeStart ?
-						      'startContainer' : 'endContainer' ].equals(
-								retval[ i ][ isBookmarkStart ?
-								   'startNode' : 'endNode' ].getParent() ) )
-							dirtyRange[ isRangeStart ? 'startOffset' : 'endOffset' ]++;
-					}
-
-					updateDirtyRange( false, true );
-					updateDirtyRange( false, false );
-					updateDirtyRange( true, true );
-					updateDirtyRange( true, false );
-				}
-			}
-
-			// Update ranges caches on dirty.
-			if ( dirtyRange )
-				this._.cache.ranges = ranges;
+				ranges = this.getRanges();
+			for ( var i = 0 ; i < ranges.length ; i++ )
+				retval.push( ranges[i].createBookmark( serializable ) );
 			return retval;
 		},
