Fix lock-race