Remove deprecation by switching pid to id