Make ternPID buffer-local