update length and fix typo