Fixed more chars added even if maxlength limit is reached