 			}
 
 			if (this.multipleFiles) {
-				for (var i:Number = 0; i < this.fileRefList.fileList.length; i++)
+				for (var i:Number = 0; i < this.fileRefList.fileList.length; i++) {
 					processFile(new File("file_" + (this.idCounter++), this.fileRefList.fileList[i]));
-			} else
+				}
+			} else {
 				processFile(new File("file_" + (this.idCounter++), this.fileRef));
+				this.fileRefArray.push(this.fileRef);
+				initSingleFileReference();
+			}
 
 			this.fireEvent("SelectFiles", selectedFiles);
 		}
 
 		/**
-		 * Send out all stage events to page level JS inorder to fake click, hover etc.
+		 * Sefnd out all stage events to page level JS inorder to fake click, hover etc.
 		 *
 		 * @param e Event object.
 		 */


			this.fireEvent("Init");
		}

		/**
		 * Event handler for selection cancelled. This simply fires the event out to the page level JS.

		private var id:String;
		private var fileFilters:Array;
		private var multipleFiles:Boolean;
		private var fileRefArray:Array = [];
		private var fileRef:FileReference;

		/**
