Fix lock procedure, and add lock function to EditOperator form