fixed bug in upload dialog.