Fixing some retry checking logic.