Fixes an issue where the number of retries was always set to 1.