Fixed a bug that caused dialogs to not be saved in the page for later use.