Use id instead of pid to avoid deprecation