Minor fixes in agent tests