resolve racing condition issue the easy way