fix agent merge