fix retry at end