fixed concurrent bug, now optimizing the hand off locks.