Add maxlen check to converter