fix retry bug