Bufixes around lock system