Fixed #142 - Tracked down a couple of structures that were not protected by critical sections and were causing corruption when run on multi-core systems.  Before the fix it was pretty easy to reproduce failures and after it has been working perfectly.