retryCounter improvement