work around race condition