fix lock bugs
fix bugs