Small change to activity saving logic.
Merge branch 'dev' into test