Added 2 retries in case the API connection fails (happens some times)