fix ThreadSafeQueue logic