fixes #6302 Need set a max length