Slowly getting rid of the race conditions