Corrections on the algo