fix tmp races

closes #60