Trying to fix threading efficiency bug.

It's not working.