 					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 )
 						{

					}
					var sampledCSVDataSource:CSVDataSource = WeaveAPI.globalHashMap.requestObject(sampleTitle.value, CSVDataSource, false);
					sampledCSVDataSource.setCSVData(sampledArray);
					sampledCSVDataSource.keyType.value = originalCSVDataSource.keyType.value;				
					sampleTitle.value = "";
				} 
			}

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