Refactoring
Add state reception check