Fixed a minor bug caused by the lock bend.
Minor changes.