Fixed sorting processes where pid is blank.