fix lock issue