added missing pid assignment