Fix bug in extracting pending UIDs from download stack.