A few additions for locking.