Some changes to sart fixing code