Fix pid assignation