Warning fixes.
Copy-paste fix for elements with max_length set.
Merge branch 'master' into Avoyd