plenty fixes, main one is to keep /tmp clean