Corrections

Corrections to the code