Added channel locking.