added default maxlength to adaptive qr