turn optional lock from null to false (close #2208)