fixed wrong unlock that could bring to record never unlocked. issue #2866