fix download finished with error bug