fix agent tests