fix calculatePlannedValue and its history