Bug fix workflow logic for checking if activity was completed.