Restored lock functionality.