Add locking.