fix retry limit bug