simplified and bugfixed occasional lock contention.