Fixed issue with multithreaded batch item similartities where incorrect number of similarities were output.

Signed-off-by: fape <fape88@gmail.com>