ensure we don't get extraneous bits when finding activity
fix #2507
Merge pull request #2717 from jlipps/master

ensure we don't get extraneous bits when finding activity