fix bug when downloding tar file