fixes/improvements to pid tuning