- added a counter to retry after a timeout