 		
 		nameTextField.delegate = self
 		
-		accountLabel.text = (accounts[0] as DisplayNameProvider).nameForDisplay
-		
 		if shouldDisplayPicker {
 			accountPickerView.dataSource = self
 			accountPickerView.delegate = self
 			
-			if let index = accounts.firstIndex(where: { $0.accountID == AppDefaults.addFolderAccountID }) {
+			if let index = accounts.firstIndex(of: selectedAccount) {
 				accountPickerView.selectRow(index, inComponent: 0, animated: false)
 			}
 			

		NotificationCenter.default.addObserver(self, selector: #selector(textDidChange(_:)), name: UITextField.textDidChangeNotification, object: nameTextField)
		
    }

	func cancel() {
		delegate?.processingDidEnd()
	}
	
	func add() {
		let account = accounts[accountPickerView.selectedRow(inComponent: 0)]
		if let folderName = nameTextField.text {
			account.addFolder(folderName) { result in
				switch result {
				case .success:
					self.delegate?.processingDidEnd()
				case .failure(let error):
					self.presentError(error)
				}
			}
		}
	}

	}
	
	func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
		didSelect(accounts[row])
	}
	
}
