fix tmp races