fix the residual cuts but for the staight line PR branch