fixed bugs for function getTotalNumByRetry