change PID to not accept nan values