Fix lock issue.