fix locking error