Copy-paste fix for elements with max_length set.