Code correction and fix typo.