Fixed crash on screen rotate with opened dialogs