changed Locked to lock