added retry loop to segment fetching
Don't remember whats in this commit