Fix race condition

Signed-off-by: Rick Copeland <rick@synapp.io>