Fix a problem that doesn't set collectedCb when timeout is zero.