rolled back the overhaul of locking mechanisms in commit 770917047b66ddce29047c7b2491ef9ea839646f