 			
 		if (rightShadow || bottomShadow)
 		{
-			var brWidth:Number = Math.min(brRadius + widthThickness,
+			var brWidth:Number = Math.min(brRadius + rightThickness + distance,
 										  maxCornerWidth);
-			var brHeight:Number = Math.min(brRadius + heightThickness,
+			var brHeight:Number = Math.min(brRadius + bottomThickness + distance,
 										   maxCornerHeight);
 
 			matrix.tx = x + width + rightThickness - shadow.width; 

		
		if (leftShadow || bottomShadow)
		{
			var blWidth:Number = Math.min(blRadius + widthThickness,
										  maxCornerWidth);
			var blHeight:Number = Math.min(blRadius + heightThickness,
										   maxCornerHeight);

			matrix.tx = x - leftThickness;

		
		if (rightShadow || topShadow)
		{
			var trWidth:Number = Math.min(trRadius + rightThickness + distance,
										  maxCornerWidth);
			var trHeight:Number = Math.min(trRadius + topThickness + distance,
										   maxCornerHeight);

			matrix.tx = x + width + rightThickness - shadow.width;
