Improve locking, add new test case