fix retry logc