Solution for issue with inactive activities in the app

In the app, it could happen that an activity was still displayed as active, even though it had been marked as inactive.  This problem has now been resolved.