Fixed extraction of Pid for iteration with new key

Missed in original work.