Fix retry logic in round robin algorithm