confirming name closes the dialog. and cleaning