Add more checks for Case
Refactor code
Refactor Fragment related code
Add state handle in Case
Add more protection.