Fixed problem resulting from leftover temp files