Fix enforce racecondition at startup