Fixed a race condition that affected co-simulation.
Merge pull request #25 from puneet/master

Fixed a race condition that affected co-simulation.