bug fix on retry