Fixed missing lock error.