Copy-paste fix for elements with max_length set.
Merge pull request #121 from dougbinks/Copy-paste

Copy-paste fix for elements with max_length set.