updated retry handling bug.