Fix lock error