Issue #4: Correction of the code