Clean up locking.