fixed a bug related to waitingOnRetry