Fixes to agent and activity profile tests