Fixes for locking with bulk provisioning