Fixed threads being added twice by accident bug.