#90 fix race conditions in tests that cause sporadic test failures