fix finish crash on retry
fix timeout crash