fixed bug in tmp name