fix bug when there are upload fail