Adding lock for (minimal) testing.