Another logic fix for handling master password change dialog.