added AsyncLock mechanism to fix sync bug