add retries in re-detection