fix thread exit while downloading