Fixing input maxlength issue