tweaking to work with the integration test project.
Fixed a concurrent modification bug.