Fix multithreaded matching part 2