Fixing error in pool stopping code that didn't reset the value of the thread. This caused it to be impossible to restart the pool.