ArduPPM: Corrected 2 typos and a logic check error in the task optimizer causing wrong behavior.