Added API call retries