more tmp fixes