fixed retry logic