that points to a bigger problem - the code acquires the lock in the wrong place