Fix behavior of retries