clean up dialogs and fix perms