fix issues with PID/TID header parsing