Fix bug in PID library