Solved a critical concurrent-programming bug.