fix lock issue.