Added request retrying logic.