Fixing background dialogs issue