Fixed the wrong registering of the dialogs.
Cleanup.