Thread synchronization wasn't working like we thought