Fixed issue #2881
fixed wrong unlock that could bring to record never unlocked. issue #2866
Issue #2879 was fixed without tests.
Issue #2857 was fixed.
Issue #2857 was fixed.