Fix potential threading issue
Revert "Fix potential threading issue"

This reverts commit c5ae0827f0f6ecd9ee175683881155865a23bbc5.