Add better support for reusable dialog.