Found and removed race condition