Fixed issue with maxlength to use max_length