- Implemented proper activity check