Fixed displaying of dialogs.