fix lock bug by using new lock lib