Corrections on the code