Added corrections in the code