fix regression in lock deadlock issue