bug in similarity calculation worker