fix typo in code max_length