fix threading dupe bug