fix for retries logic