fixed retry bug