fixed missing tmp cleanup