Fix issues in file-upload dialog