Fix potential synchronization issue