Minor change to thread synchronization