Fixes in lock tests