Added exclusive locking.