Correct several errors

The first version have several errors that are corrected with this revision.