Fixed Dialogs crashing on screen rotation