Correction of the function implementation
Typos correction.