this magic with CreatedDialog and close dialog should be enclosed in sm dialogs module, not?