Updated lock script.