Retry logic; more tuning