Update max_length