fix error if retries are exhausted