Added extra blocks for scoped locks.