Fix bug when download error