fix maxlength attribute