small bug fixes in the pid controller