Fixed dialogs' modality and close operation.