More robust PID retrieval