fix retries to mena amount of retries not max runs, improved tests