fix race conditions in tests