reducing chance of failed race condition