Fix bug in dialog.