fix lock unlock