lock/unlock now works on restore