fixed synchronization problem