Bugfix to pid mode.