Shift pid.

Changed pid to array index.