fix small error computing ramp