Fix typo in new retries method

and add online check to prevent errors.