fix a lock contention issue