destroy and remove dialogs after they're closed - otherwise they remain in the DOM, hidden but there
fix #288