Fix locking.