PID values not set properly but works