Fixes two issues in ThreadSafetyTestCase.