 					else // column sampling begins here
 					{
 						i = sampleSizeColumns.value - 2; // we need to reduce this number by one because the title row already accounts for a row
-						length = transposedSampledArray.length - 2; // accounted for the first two columns removed.
+						length = transposedSampledArray.length; // accounted for the first two columns removed.
 						sampledArray = []; // making this sampled array reusable
 						while( i != 0 )
 						{

				} 
				else
				{
					return;
				}
				if (originalArray.length < sampleSizeRows.value)
				{
					sampledArray = originalArray; // sample size is bigger than the data set.
				}
				else // sampling begins here
				{

	import flash.display.Shape;
	import flash.geom.Point;
	import flash.utils.Dictionary;
	
	import mx.controls.Alert;
	
	import weave.Weave;
	import weave.api.WeaveAPI;
