fixed retry func