Fixed race condition. All tests are successful now.