Fix crash for config change when dialog fragment is visible (Android CRUD)