Fixes exception when retries is not specified. Defaults it to 0