Dialogs fixed (2222)

No more crashes with dialogs enabled;