fixed: bug with cleaning temporary directory