Fixed bug in retries.