fix lock problem