Fix maxLength error