fix remove temp image error