fix lock bug